Python Tutorial: Custom Sublime Text Build Systems

preview_player
Показать описание
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:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:
Рекомендации по теме
Комментарии
Автор

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

stardusts
Автор

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

ugniusstelingis
Автор

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.

unclestephen
Автор

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.

joelprestonsmith
Автор

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.

joelprestonsmith
Автор

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

acecommando
Автор

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

Crysna_V
Автор

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.

junaidtanoli
Автор

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

myblackhatch
Автор

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

preetifit
Автор

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

clearthinking
Автор

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

hrcxjye
Автор

HOLY SHIT IT WORKED, UR THE BEST BRO!!

kungfudumpling
Автор

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.

finalsecretofchrono
Автор

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

fer
Автор

How to import modules like pandas into newly built systems?

martianlee
Автор

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?

coachhungry
Автор

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

umavathiyamini
Автор

Finally somebody with sense, Thanks a lot man

nnero
Автор

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

sreejishnair