Python Tutorial: Custom Sublime Text Build Systems

Поделиться
HTML-код
  • Опубликовано: 27 сен 2024
  • In this video we will be learning how to create multiple build systems within Sublime Text. This is useful if you have projects which require you to switch between Python 2 and Python 3, or if you'd like to customize your default Python build system. Let's get started.
    ✅ Support My Channel Through Patreon:
    / coreyms
    ✅ Become a Channel Member:
    / @coreyms
    ✅ One-Time Contribution Through PayPal:
    goo.gl/649HFY
    ✅ Cryptocurrency Donations:
    Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
    Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
    Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
    ✅ Corey's Public Amazon Wishlist
    a.co/inIyro1
    ✅ Equipment I Use and Books I Recommend:
    www.amazon.com...
    ▶️ You Can Find Me On:
    My Website - coreyms.com/
    My Second Channel - / coreymschafer
    Facebook - / coreymschafer
    Twitter - / coreymschafer
    Instagram - / coreymschafer

Комментарии • 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 11 месяцев назад

      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"
    }

  • @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!!

  • @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.

  • @clearthinking5441
    @clearthinking5441 5 лет назад +1

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

  • @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.

  • @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.

  • @myblackhatch
    @myblackhatch 8 лет назад

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

  • @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.

  • @kungfudumpling8523
    @kungfudumpling8523 3 года назад

    HOLY SHIT IT WORKED, UR THE BEST BRO!!

  • @nnero7
    @nnero7 7 лет назад +1

    Finally somebody with sense, Thanks a lot man

  • @preetifit6852
    @preetifit6852 6 лет назад

    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

  • @umavathiyamini7679
    @umavathiyamini7679 6 лет назад +1

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

  • @andyhuang8511
    @andyhuang8511 2 года назад

    Thanks. It really helps me a lots.

  • @paulwest-w6s
    @paulwest-w6s Год назад

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

  • @BioxyTube
    @BioxyTube 6 лет назад +2

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

  • @lakshmilentz
    @lakshmilentz 5 лет назад +2

    Thank you! This is super helpful!

  • @phenethemapepe8970
    @phenethemapepe8970 4 года назад +1

    Thank u man

  • @martian2lee
    @martian2lee 7 лет назад +1

    This is just what I need. Thank you!

  • @martian2lee
    @martian2lee 7 лет назад +5

    How to import modules like pandas into newly built systems?

  • @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 RUclips... mindblowing

  • @hubertcombomarketing2693
    @hubertcombomarketing2693 4 года назад +1

    Good as always. Thanks.

  • @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.

  • @sreejishnair5922
    @sreejishnair5922 5 лет назад +1

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

  • @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?

  • @tymothylim6550
    @tymothylim6550 3 года назад

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

  • @krishnagarg6870
    @krishnagarg6870 4 года назад +1

    Nice!!

  • @keevee09
    @keevee09 7 лет назад

    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"
    }

  • @smitprabhukhanolkar1193
    @smitprabhukhanolkar1193 7 лет назад

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

  • @tucado
    @tucado 6 лет назад +1

    Thank you, very helpful!

  • @jtad5574
    @jtad5574 4 года назад +1

    Hi Corey
    How can i configure pipenv with sublime text?

  • @danielmacleon3008
    @danielmacleon3008 7 лет назад +1

    You're the best. Thanks!

  • @hexprince
    @hexprince 7 лет назад +1

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

  • @JoshuaDHarvey
    @JoshuaDHarvey 4 года назад

    Great video, thank you!

  • @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??

  • @gowthamsridhar4368
    @gowthamsridhar4368 5 лет назад +1

    Thank you! teacher

  • @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? :/

  • @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?

  • @bishnudas3562
    @bishnudas3562 3 года назад

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

  • @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 6 лет назад

      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!

  • @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
      ruclips.net/video/etIJMVIvVgg/видео.html

  • @ordinaryminecraftplayer482
    @ordinaryminecraftplayer482 3 года назад

    what if my python3 is in library instead of user

  • @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

  • @juris.l.6037
    @juris.l.6037 5 лет назад

    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.

  • @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

  • @staga2390
    @staga2390 4 года назад

    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

  • @marh122
    @marh122 8 лет назад +1

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

  • @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?

  • @deepikakala3955
    @deepikakala3955 4 года назад

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

  • @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....

  • @NelsonMandelanelly
    @NelsonMandelanelly 8 лет назад

    Good Job

  • @skankthis
    @skankthis 8 лет назад

    great thanks

  • @clspears5644
    @clspears5644 8 лет назад

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

  • @DaniruDEV
    @DaniruDEV 3 года назад

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

  • @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)

  • @nestorcolt
    @nestorcolt 6 лет назад

    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.

  • @Kev...
    @Kev... 5 лет назад +1

    Wait how did your window just snap like that?

    • @coreyms
      @coreyms  5 лет назад +1

      I use an application called HyperDock

  • @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.

  • @ВисалИнг
    @ВисалИнг 7 лет назад

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

  • @rohaanjoshi4809
    @rohaanjoshi4809 7 лет назад

    thanks bud

  • @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

  • @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.

  • @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).

  • @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!!

  • @TheOnlyJunniZ
    @TheOnlyJunniZ 6 лет назад

    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)

  • @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.

  • @kylec.5476
    @kylec.5476 7 лет назад

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

  • @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.

  • @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.

  • @supriyantapoddar6129
    @supriyantapoddar6129 6 лет назад

    How to take input?

  • @qtran101
    @qtran101 5 лет назад

    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  5 лет назад

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

    • @qtran101
      @qtran101 5 лет назад

      @@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

  • @AbdelrhmanKAli
    @AbdelrhmanKAli 6 лет назад

    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  6 лет назад

      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

  • @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 6 лет назад

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

  • @panw3i
    @panw3i 7 лет назад

    only use pycharm

  • @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?

  • @randy4443
    @randy4443 4 года назад

    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.

  • @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]+)"
    }

  • @himanshu934
    @himanshu934 Год назад

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

  • @intelligenceservices
    @intelligenceservices 7 лет назад

    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 RUclips 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.

  • @sashashavit8179
    @sashashavit8179 4 года назад

    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..

  • @akiriisio8558
    @akiriisio8558 5 лет назад

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

  • @tech-adventurer
    @tech-adventurer 6 лет назад +1

    You are really awesome! thx

  • @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???

  • @JeanPokoujeanpokou
    @JeanPokoujeanpokou 8 лет назад

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

  • @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 5 лет назад

      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 5 лет назад

      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.

  • @kenrosenberg8835
    @kenrosenberg8835 7 лет назад

    thank you Corey It was very Helpful!!!

  • @kshitijdeansam8093
    @kshitijdeansam8093 8 лет назад

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

  • @DM-lh3df
    @DM-lh3df 6 лет назад

    best video ever. super helpful thank you!

  • @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.

  • @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.