Python Tutorial: Custom Sublime Text Build Systems

Поділитися
Вставка
  • Опубліковано 2 гру 2024

КОМЕНТАРІ • 148

  • @stardusts42
    @stardusts42 6 років тому +38

    For Windows, to find the path of the python compiler type "where python" in the cmd(you may need to change the "\" to "\\" in that path when pasting in to the sublime build file).

    • @ayushmanbhardwaj9884
      @ayushmanbhardwaj9884 5 років тому +2

      [WinError 5] Access is denied
      after build finished

    • @yashmore7732
      @yashmore7732 4 роки тому

      bro it got me 2 replys on cmd

    • @samzhao2261
      @samzhao2261 4 роки тому

      Sir you are life saver, thx

    • @mal7052
      @mal7052 2 роки тому

      I'VE BEEN WORKING ON THIS ERROR FOR 2 DAYS AND THE ERROR JUST TO ADD ONE SLASH. WELL THANK YOU SO MUCH YOU SAVE ME

    • @flororobles5830
      @flororobles5830 Рік тому

      Did this change on sublime text 4? The build that I made for python 311 is not showing up when I go to 'tools'-'build system'.

  • @ugniusstelingis817
    @ugniusstelingis817 6 років тому +24

    WINDOWS USERS. Dont just copy paste the path from windows explorer. Please change the path of your python.exe file in line 1 of the code. I use python 3 so even if you use python 2 then you just have to change the path between the quotes and do remember to use forward slash (“/”) in the path. Dont just copy paste the path from windows explorer.
    {
    "cmd": ["C:/Users/User/AppData/Local/Programs/Python/Python37-32/python.exe", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
    }

  • @joelprestonsmith
    @joelprestonsmith Рік тому +1

    Well. The instructions don't seem to work now that it's 2023. Not terribly surprising, but your videos are so good I tried them out anyway. When I follow the steps I'm able to save a build system as a file, but that system doesn't show up under Tools → Build Systems. I still learned a lot, and I'm grateful--as always--for your videos.

  • @Crysna_V
    @Crysna_V 8 років тому

    I'm new to Sublime and had no idea how to use python on it, this helped a lot, thanks!!

  • @unclestephen2722
    @unclestephen2722 2 роки тому +5

    Great video Corey. But we're six years on now, and on sublime text 4, and I'd like a video on how to do this for virtual environments, including conda environments.

    • @moo_goo
      @moo_goo 2 роки тому +2

      I second this. Im trying to research how to run pipenv project files through sublime. the recommended pipenv package plugin that google results show doesnt seem to do anything.
      im looking to figure out how to accomplish this.

    • @portfedh
      @portfedh 2 роки тому

      X3 Did you guys find how to do this?

  • @joelprestonsmith
    @joelprestonsmith Рік тому +1

    I figured out what I was doing wrong (regarding why my builds were not showing up under Tools → Build Systems); you HAVE to save a build in the User folder FOR Sublime Text. NOT the USERS folder that's native to Mac. In the video, you can see that the User folder is the one that's chosen for the python version being saved in this tutorial, but there's no audible mention of it, or the importance of it. Corey does illustrate how to find that folder by going to Sublime Text → Preferences → Packages (you'll then see the User directory). In the first instance of your creating a build system, the User folder will be listed as the default directory for where the file will be stored. Don't change it! Otherwise your build will NOT show up in the list of built systems.

  • @junaidtanoli1
    @junaidtanoli1 5 років тому +1

    Just download sublime text 3 package name : 'anaconda' and after installing it , just select it from the this menu in ST3: tools > build system >anaconda python builder , create a simple a file app.py and write print("hello to python world"). save it and press ctrl +B , and here it is , thats how i am using it for now.

  • @clearthinking5441
    @clearthinking5441 6 років тому +1

    Thank you very much. I tried for many hours until I found your great video!

  • @myblackhatch
    @myblackhatch 8 років тому

    Just wanted to say thanks. I am new to both sublime and python and your videos have helped a bunch.

  • @kungfudumpling8523
    @kungfudumpling8523 3 роки тому

    HOLY SHIT IT WORKED, UR THE BEST BRO!!

  • @preetifit6852
    @preetifit6852 7 років тому

    The path that the Terminal gives to Python 3.6 is: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6, but pasting this path to the code in Sublime to use Python 3.6 doesn't work. Using this path instead, /usr/local/bin/python3.6, worked!
    "cmd": ["/usr/local/bin/python3.6", "-i", "-u", "$file"],
    "file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
    "selector": "source.python"
    Thanks Corey

  • @nnero7
    @nnero7 7 років тому +1

    Finally somebody with sense, Thanks a lot man

  • @acecommando1
    @acecommando1 7 років тому +5

    Wow, in this video you said "Hey everybody how's it going?" instead of your usual "Hey there, hows it going everybody?"

    • @coreyms
      @coreyms  7 років тому +8

      Haha... gotta mix it up.

  • @andyhuang8511
    @andyhuang8511 2 роки тому

    Thanks. It really helps me a lots.

  • @lakshmilentz
    @lakshmilentz 5 років тому +2

    Thank you! This is super helpful!

  • @finalsecretofchrono1339
    @finalsecretofchrono1339 5 років тому +1

    How does one set up a virtual environment build that can be used in Sublime, not just Terminal? I tried pasting in the path of my virtual env into the shell cmd, but to no avail.

  • @umavathiyamini7679
    @umavathiyamini7679 6 років тому +1

    Thanks a lot.You explained very well with providing reasons.

  • @coachhungry3103
    @coachhungry3103 7 років тому +1

    After having followed the directions on this and the other video I get a no build system error when running my intro program with my python36 build system. However, the automatic build system will run it and uses the exact Path I put into the build system code. Should this cause me concern?

  • @martian2lee
    @martian2lee 8 років тому +1

    This is just what I need. Thank you!

  • @hubertcombomarketing2693
    @hubertcombomarketing2693 4 роки тому +1

    Good as always. Thanks.

  • @keevee09
    @keevee09 8 років тому

    Working in a pyenv virtual environment called 'txt' and so here is an example virtual environment that works:
    {
    "cmd": ["/Users/tony/.pyenv/versions/txt/bin/python", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
    }

  • @BioxyTube
    @BioxyTube 6 років тому +2

    Thank you so much....really. You save me and many others I'm sure.

  • @martian2lee
    @martian2lee 8 років тому +5

    How to import modules like pandas into newly built systems?

  • @kenrosenberg8835
    @kenrosenberg8835 7 років тому

    thank you Corey It was very Helpful!!!

  • @fer1847
    @fer1847 4 роки тому +1

    I just had to add "/python.exe" to the directory of the personal build system, since it actually indicates the command to run a program. If i didn't, I would be teeling the command to run a directory instead. I was getting a [WinError 5] Access is denied error, and now it is solved. Great content anyways corey! Didn know you worked for NASA before UA-cam... mindblowing

  • @paulwest-w6s
    @paulwest-w6s Рік тому

    Great lecture, know you are busy hope you can find time to lecture on Sublime 4, thank you

  • @tymothylim6550
    @tymothylim6550 3 роки тому

    Thank you very much for this video :) It was helpful and informative!

  • @tucado
    @tucado 6 років тому +1

    Thank you, very helpful!

  • @JoshuaDHarvey
    @JoshuaDHarvey 4 роки тому

    Great video, thank you!

  • @smitprabhukhanolkar1193
    @smitprabhukhanolkar1193 7 років тому

    Thank you so much, Corey. It's really helpfull.

  • @DM-lh3df
    @DM-lh3df 6 років тому

    best video ever. super helpful thank you!

  • @jtad5574
    @jtad5574 4 роки тому +1

    Hi Corey
    How can i configure pipenv with sublime text?

  • @sreejishnair5922
    @sreejishnair5922 5 років тому +1

    The custom build system doesn't take any user inputs from user please help me with that

  • @Erdos2m
    @Erdos2m 7 років тому +8

    For Windows10 users on sublime text 3, use the following:
    1) I have my python.exe files as follows
    python2.7 = python.exe and
    python3.5 = python3.exe
    2) In the sublime-build file I used
    {
    "cmd": ["python3", "-u", "$file"],
    "file_regex": "^ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
    }
    and it worked fine. Using the file path didn't work. Hope this helped someone!

    • @ramadanelmoudi8694
      @ramadanelmoudi8694 7 років тому +2

      for Windows the path should be like this example C:\\Users\\admin\\python3.6

    • @ctop1745
      @ctop1745 7 років тому

      My windows path looked like the following: C:/Program Files (x86)/Python36-32/python.exe

    • @mmk7432
      @mmk7432 7 років тому +1

      1.Go here C:\Users\Zayn\AppData\Local\Programs\Python\Python36-32 (copy this)
      Note: Here Zayn is the user name of my computer. It will be different in your case.
      (AppData folder maybe hidden check the show hidden files option)
      2. Now right click on Computer icon and click on PROPERTIE's option. Then select ADVANCED SYSTEM settings in left sidebar.
      3. Now click on [Environment Variables] and then under [System variables] > [select variable] with name [Path].
      4. Click Edit button and then in [Path] value field keep the before data and go to end and type semicolon( ; ) and dont erase anything just paste the path of Python directory that you copied before the semicolon.
      ( ;C:\Users\Zayn\AppData\Local\Programs\Python\Python36-32 )
      (paste this)

    • @escalen4065
      @escalen4065 7 років тому +4

      My path looks like C:\\Users\\Name\\AppData\\Local\\Programs\\Python\\Python36-32\\python.exe
      I needed a double \\ and without the "\\python.exe" I got a "WinError 5"

    • @petrisss2047
      @petrisss2047 7 років тому

      This worked for me! Do not forget to close and reopen the Sublime Text after you change your Path variable in Windows! thanks a lot!

  • @sashashavit8179
    @sashashavit8179 5 років тому

    Hi Corey, why it doesn't work on my Mac? Is it because I got in nano ~/.bash_profile I got : export PS1='$ '
    export PATH=/usr/local/anaconda3/bin:$PATH ? What happens is that I am setting 3.7 as: {
    "shell_cmd": "/usr/local/bin/python3.7 ${file}",
    "selector": "source.python",
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "working_dir": "${file_path}",
    }
    but still once I hit Command+B it shows as: /usr/local/opt/python/bin/python3.7 And longer scripts won't run..

  • @hexprince
    @hexprince 7 років тому +1

    Thanks so much, man! You are awesome! :)

  • @OttoFazzl
    @OttoFazzl 8 років тому +1

    Can I use this method to make build systems for my custom virtualenvs? Will all the dependencies work correctly in that case?

    • @el8003
      @el8003 6 років тому

      I want to know this too. Did you find out?

  • @phenethemapepe8970
    @phenethemapepe8970 4 роки тому +1

    Thank u man

  • @akiriisio8558
    @akiriisio8558 5 років тому

    Hi Corey, was there supposed to be instructions for virtualenvironments somewhere?

  • @etedali1975
    @etedali1975 4 роки тому

    Hello Corey,
    I've set up a new installation of sublime text 3 on ubuntu 20.04. Have also watched some of Your videos to set up the dev environment.
    Now my question is why does the terminal window at the bottom of sublime text 3 not execute / run inputs from code above after ctrl + b.
    I've installed sublimeREPL, works just fine. I don't like it to switch between windows after running my code though.
    Would like to have a built-in terminal how it's applicable in VS Code etc.
    Probably You've covered this setting, couldn't find in Your collection of videos :)
    Best Regards
    Armin

  • @danielmacleon3008
    @danielmacleon3008 7 років тому +1

    You're the best. Thanks!

  • @genelee1356
    @genelee1356 7 років тому

    Corey, It seems Zboyy and I have exactly the same problems. I made some progress. On Terminal, both /Library/Frameworks/... and /usr/local/bin/Python3 work. But with Custom Sublime Text Build, 2.7 works. For Python3, though, it doesn't get to either /Library/... or /user/local/bin. As Zboyy said, the Build searches [path: /usr/bin:/bin:/usr/sbin:/sbin] and misses /usr/local/bin/. Do we have to somehow specify the path in the custom build for Python3? Thanks.

  • @sunilkumar-xp7ov
    @sunilkumar-xp7ov 6 років тому

    hey, i couldn't find the execution time displayed in the console for the new build systems, but it is displayed for default python build. could u help me out???

  • @himanshu934
    @himanshu934 2 роки тому

    Great tutorial!
    but i still don't know how to take inputs in sublime text is there a package or something?

  • @tech-adventurer
    @tech-adventurer 6 років тому +1

    You are really awesome! thx

  • @KevinMThomas
    @KevinMThomas 8 років тому +1

    Great tutorial however when I try to use something like input and enter data in the build system it does not work correctly. Is there a way to set it up so that you can interact with it like we do in a console?

    • @peterpace3379
      @peterpace3379 4 роки тому

      Watch this video for the input issue
      ua-cam.com/video/etIJMVIvVgg/v-deo.html

  • @faezehmontazerin9266
    @faezehmontazerin9266 4 роки тому

    I just want to use normal python build system but it has error "'python' is not recognized as an internal or external command," what is the problem??

  • @juris.l.6037
    @juris.l.6037 6 років тому

    Hello!
    I am programming in Python and auto-complete feature works for 90% of the libs. Libs like os, sys, unittest... But now now I am trying to use libraries like selenium and numpy and they don't have auto-complete feature. I am using Anaconda (conda) package distribution and I am using Anaconda ST3 Plugin. Also tried something called (a plugin) Selenium Snippets. None of that helps. Please, any suggestions would be much appreciated.

  • @jamesrobinson6330
    @jamesrobinson6330 6 років тому

    Hey is there a way on windows not to use CMD as my school has blocked CMD? (We can still use the python terminal executable)

  • @OttoFazzl
    @OttoFazzl 8 років тому

    I am also using Sublime Text 3 for Mac, but your tabs look differently, is there a special plugin for tabs like yours?

  • @clspears5644
    @clspears5644 8 років тому

    just wondering which sublime text you're using in this video?

  • @dxsp1d3r
    @dxsp1d3r 5 років тому

    Its not working in latest version of sublime text I use windows 10 with python2 and python3 installed. Am using this as path "C:\\Python27" and "C:/Python27" also tried this as well Error i got is [WinError 5] Access is denied
    [cmd: ['C:\\Program Files\\Python3', 'C:\\Users\\verMI\\Desktop\\Requests.py']]. I am also running sublime as Administrator

  • @marh122
    @marh122 8 років тому +1

    Hi Corey, i have a windows, can I somehow connect my sublime text to Linux VM ?

  • @abhaswasnik7337
    @abhaswasnik7337 2 роки тому

    well im having this error
    C:\Users\abhas\AppData\Local\Programs\Python\Python36\python.exe: can't find '__main__' module in ''
    what do I do? :/

  • @staga2390
    @staga2390 5 років тому

    Hey Corey, how can I change the build system for Atom? BTW Thank you so much for your videos, you are definitely my code master

  • @nestorcolt
    @nestorcolt 7 років тому

    hey mate! everything awesome, thanks for sharing, now, do you know how could i set up the virtual environment interpreter? i have it running with anaconda on windows but in sublime i want to use the interpreter per project with virtual env, because in this venv i have django for example and in the normal i have everything else.

  • @kshitijdeansam8093
    @kshitijdeansam8093 8 років тому

    how to i open my console window for cpp on pressing cmd+B for cpp

  • @DrivenByWordsOfficial
    @DrivenByWordsOfficial 5 років тому +1

    Thank you! teacher

  • @Jodingowal
    @Jodingowal 8 років тому

    This tutorial really helps. Just wondering if you can show shortcut to switch back and forth, let's say, between python 2.7 and python 3.5, so it is not necessary to navigate thru the mouse clicking everytime you want to run in Build System?

    • @coreyms
      @coreyms  8 років тому

      +Yongjae Lee I'm not aware of a shortcut to do this, but that would be useful! I don't switch between 2 and 3 on a regular basis, so I usually just use the drop down menus to select the correct version. There may be shortcuts available though... I'm not sure.

    • @Jodingowal
      @Jodingowal 8 років тому

      Corey Schafer​ Well i was using python 3.5 but in sublime they dont interact with input value so i installed sublimeREPL so that the package allows sublime to interact with input value. So i have to navigate thru mouse to switch back and forth between python 3.5 and the REPL build system although REPL just works to print out every thing. I know jetbrain or pycharm with sublime makes everything perfect, which ill eventually set it up but right now im just learning new language. But great video!!

  • @ВисалИнг
    @ВисалИнг 8 років тому

    I want to run it with terminal what would I do, please?

  • @JeanPokoujeanpokou
    @JeanPokoujeanpokou 8 років тому

    How to open the output in the iOS terminal app instead of the built-in terminal @Corey Shaffer

  • @NelsonMandelanelly
    @NelsonMandelanelly 8 років тому

    Good Job

  • @oksanas263
    @oksanas263 7 років тому

    I cannot get function INPUT to work whatsoever in Sublime Text. Is there anything I can do to make it work? as well as programs with command-line arguments...

    • @oksanas263
      @oksanas263 7 років тому

      I tried sublime REPL, InputArgs.. nothing works. I cannot run any single code(((

    • @coreyms
      @coreyms  7 років тому

      Hmm, I was going to suggest SublimeREPL but it sounds like you tried that. Usually when I write a program that requires input or command-line arguments, I usually just write it and save it using Sublime Text but will then run it from my command-line. That's how I personally use it so I have never had the need for input within Sublime. Sorry I couldn't be of more help.

  • @khle0806
    @khle0806 7 років тому

    Hi Corey, many thanks for the tip here! I do follow your instruction and the result has been printed out successfully. But once I need to input text as the process when executing a program like the calculator program, the function would just stop at the last line that asked me to key in what ‘input’ asked me to do. How can i solve the problem?

    • @coreyms
      @coreyms  7 років тому +1

      Hey there. I have heard from others that the SublimeREPL package allows you to do this. I have never used it personally, but it seems to have worked for others.

  • @abhishekbhatia6092
    @abhishekbhatia6092 6 років тому

    What is the reasoning behind using the system prei-nstalled python versions rather than the anaconda versions?
    I mean all my packages are installed in anaconda python versions so rather use them.
    Besides installing packages with pip most of the times does not install the latest version available while conda (depending upon the channels used) does.
    Also why don't you have your default python interpreter as the Anaconda one?

    • @coreyms
      @coreyms  6 років тому

      Hey there. I actually do use Anaconda most of the time. You can set your build system up to handle either.

  • @randy4443
    @randy4443 5 років тому

    I don't have the -u option and my code isn't running. What can I do?

    • @robmcgowan4055
      @robmcgowan4055 4 роки тому

      For some reason, Sublime removed the "-u" option from the Basic Example at www.sublimetext.com/docs/3/build_systems.html . Make sure to put it where Corey shows.

  • @vishvips
    @vishvips 4 роки тому

    Can you add the venv python to the build sytem?

    • @coreyms
      @coreyms  4 роки тому

      Yes, adding a venv is the same as adding a normal Python path. Just add the complete path to python within your environment

  • @Kev...
    @Kev... 5 років тому +1

    Wait how did your window just snap like that?

    • @coreyms
      @coreyms  5 років тому +1

      I use an application called HyperDock

  • @qtran101
    @qtran101 6 років тому

    I followed this and created a python 3.7 build system, I build with that. Then I installed SublieREPL and choose "Python-RUN current file" but it seems to crash if I use input() in a test script and input letters. Any ideas why?

    • @coreyms
      @coreyms  6 років тому

      I always have trouble with input within Sublime. I always just use the command-line for any input

    • @qtran101
      @qtran101 6 років тому

      @@coreyms It took whole weekend but I got it to work.
      1. install python3
      2. Find python3 path, "which python3.7"
      3. Tools > Build System > New Build System
      {
      "cmd": ["/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7", "-u", "$file"],
      "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
      "selector": "source.python"
      }
      replace my path above with your path from step 2
      4. Save file in step 3 as python3.7.sublime-build in you Sublime Text "User" folder
      5. Install SublimeREPL
      6. Make a copy of Main.sublime-menu and put it in "User" folder
      7. In the copy, paste text from below link into your copy of Main.sublime-menu
      gist.github.com/Hckmar9/e1cb87b67a9836db4d26#file-main-sublime-menu
      8. Test it by going Tools > SublimeREPL > Python > Python - RUN current file
      I tested with input() function and entered strings and numbers and it worked
      I got the above to work on both my Linux and Mac

  • @DaniruDEV
    @DaniruDEV 3 роки тому

    hey can anyone tell me how to get an input in sublime text

  • @delstel6581
    @delstel6581 6 років тому

    SOLVED -- Sublime Text3 on a Mac Question -- I figured it out - I used samba shares on the VMs....
    My question is how edit files on the VMs from the Mac
    I'm running High Sierra on a Mac with several VMs on ESXi 6.5.
    All VMs are on the same network and all have ssh connections.
    I've tried rmate and can edit the files but when I try to save the changes I get:
    "Unable to save /Volumes/share/hue/motion.sh
    Error: Permission denied"
    I end up using scp to transfer the file to the VM from the mac.
    Is there a better way....

  • @krishnagarg6870
    @krishnagarg6870 4 роки тому +1

    Nice!!

  • @ordinaryminecraftplayer482
    @ordinaryminecraftplayer482 3 роки тому

    what if my python3 is in library instead of user

  • @genelee1356
    @genelee1356 7 років тому

    Corey - I'm a beginner from FORTRAN and VB and following all your FANTASTIC and HELPFUL videos. I "default" installed Python 3.6.2 fro Python.org (following your Tutorial for Beginners 1). Then I tried to "Custom Sublime Text Build" 2.7 and 3.6 as you did there. Then I saw this difference between yours and mine - "which version 3.6" gives me /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6, NOT /usr/local/bin/python3.6 which is what you have. Is there any way I can have mine like yours? Thanks.

    • @coreyms
      @coreyms  7 років тому +1

      Hi there. You may be fine leaving it like that. On my machine, /usr/local/bin/python3.6 is actually a symlink to the longer PATH. So either one should work fine. Are you having trouble getting yours to work? If it works then I would just leave it as is.

    • @genelee1356
      @genelee1356 7 років тому +1

      Thanks for your quick reply. Actually that's what python doc says - A symlink to the Python executable is placed in /usr/local/bin/. So you mean, I can use /usr/local/bin/python3.6 as you did, right? I'll certainly try it.

  • @pilaramonkgogimoshebashebi2371
    @pilaramonkgogimoshebashebi2371 6 років тому

    Hi Corey, I am a bit novice and seem to have the same problem as everyone here. I am running python3.6 i get the following path in the directory: "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6". And after creating the 3.6 build directory i get this error message:
    /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6: can't find '__main__' module in ''
    [Finished in 0.1s with exit code 1]
    [cmd: ['/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-u', '']]
    [dir: /Applications/Sublime Text.app/Contents/MacOS]
    [path: /Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin]
    Please help:)

    • @DeedsReadz
      @DeedsReadz 6 років тому

      I don't know if I'm too late, but mine kept doing the same thing. It was because I wasn't saving the file to .py before running it.

    • @Aditya-ss1rq
      @Aditya-ss1rq 6 років тому

      On your terminal type "which python3.6". if your terminal shows /usr/bin/python3.6 instead of /usr/local/bin/python3.6 change it to /usr/bin/python3.6 on the build system not /usr/local/bin/python3.6.
      On Corey's machine path of python3.5 is set to /usr/local/bin/python3.5 and not in /usr/bin/ directory so it worked for him. Hope it helps.
      I think you are running Python 2 code and using python 3 build to test it. Change the code to python3 to use python3 build ORelse use python2 build if you are not willing to change code.

  • @iamkrazashell3679
    @iamkrazashell3679 7 років тому

    I've tried all the suggestions for windows users to no avail.
    I tried this:
    {
    "cmd": ["python3", "-u", "$file"],
    "file_regex": "^ ]File \"(...?)\", line ([0-9]*)",
    "selector": "source.python"
    }
    Then this:
    {
    "cmd": ["python", "-u", "$file"],
    "file_regex": "^ ]File \"C:\\Users\\Owner\\AppData\\Local\\Programs\\Python\\Python36\\", line ([0-9]*)",
    "selector": "source.python"
    }
    I'm new to sublime and Python (well not so much Python now, lol).
    I usually just use IDLE (It's free and worked great), but I wanted to follow along in mirror to
    gain a better knowledge base.
    I don't own a mac (I'm not that code savy, lol) . I only have Winblows (It was free so I can't complain)
    Can someone help me? There has to be a way that I'm not seeing.

    • @gaaraxpo
      @gaaraxpo 7 років тому

      don't change anything in "file_regex" line unless you know what to do

  • @deepikakala3955
    @deepikakala3955 4 роки тому

    What if I want to run HTML file for templates
    How to create a built system for HTML

  • @kylec.5476
    @kylec.5476 7 років тому

    I'm just gonna go ahead and go ahead. Go ahead. I'm just gonna go ahead.

  • @intelligenceservices
    @intelligenceservices 8 років тому

    Sublime Text 3 does not build 'Hello World' with Python on Windows. Trying to even Google the problem is a 3 week task at least in my case. Sublime Text3 can't even find cmd.exe on Windows apparently. Videos on UA-cam say to add Python's Path to Environment Variables (an inscrutible Windows SNAFU) and even after doing that, SubText3 does not build .py

    • @GurpreetKakar4873
      @GurpreetKakar4873 7 років тому +1

      first, install anaconda for python 3.5 and in sublime text, tools, build systems, make new build system and save this to file and make the filename python.sublime-build
      {
      "cmd": ["C:\\Program Files\\Anaconda3\\python.exe", "-u", "$file"],
      "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
      "selector": "source.python"
      }
      it will definitely work. Also directory can be different in your system.So to check python directory interpreter open cmd on the highest c drive level and type where python.exe. If you need help tell me.

  • @skankthis
    @skankthis 8 років тому

    great thanks

  • @pnutbuttrful
    @pnutbuttrful 3 роки тому

    HELP! Can anyone tell me how to get Python to usr/local/bin? Echo $PATH results in /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 (I am working on a mac).

  • @reactionhashs6901
    @reactionhashs6901 6 років тому

    Not sure how to integrate with Anaconda environments, do you have a clue?

    • @coreyms
      @coreyms  6 років тому +1

      You can simply puth in the PATH to the Sublime executable for your Conda environment. I have done this before with success.

  • @jbond5834
    @jbond5834 6 років тому

    In win10, instead of '\' in the address of python.exe, '\\' should be used. It is the case in my case. Hope it will help.

  • @supriyantapoddar6129
    @supriyantapoddar6129 7 років тому

    How to take input?

  • @rohaanjoshi4809
    @rohaanjoshi4809 7 років тому

    thanks bud

  • @nimda2sdfsdfsd
    @nimda2sdfsdfsd 4 роки тому

    Many place its like "shell_cmd" is used, but its not working for me on Mac, Changing to "cmd" works, it should be something like this
    {
    "cmd": ["python3" , "-i", "-u", "$file"],
    "selector" : "source.python",
    "file_regex": "file \"(...*?)\", line([0-9]+)"
    }

  • @AbdelrhmanKAli
    @AbdelrhmanKAli 7 років тому

    Traceback (most recent call last):
    File "/usr/lib64/python3.6/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_main_module_details(_Error)
    File "/usr/lib64/python3.6/runpy.py", line 223, in _get_main_module_details
    (main_name, sys.path[0])) from exc
    runpy._Error: can't find '__main__' module in ''
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
    File "/usr/lib64/python3.6/runpy.py", line 188, in _run_module_as_main
    sys.exit(msg)
    SystemExit: /usr/bin/python3: can't find '__main__' module in ''
    Can't get rid of that error!!
    any tips?

    • @coreyms
      @coreyms  7 років тому

      You have to save your file. This is the error you get when you try to run the code without saving it as a py file first

  • @TheOnlyJunniZ
    @TheOnlyJunniZ 7 років тому

    For those having problems with running python 3.x in sublime text 3.
    My problem was that my python files where located in usr/local/bin and not usr/bin.
    In my case only Python 2.7 was compiling, so i just moved my python 3 files from usr/local/bin to use/bin.
    (python3.3m-config, pythonw3.3, python3.3, pydoc3.3)

  • @panw3i
    @panw3i 8 років тому

    only use pycharm

  • @bishnudas3562
    @bishnudas3562 4 роки тому

    i have installed anaconda plugin but not getting the option of "Anaconda python builder" in build systems...why?