- Sublime Text Python Setup
- Sublime Text Python Input
- Sublime Text Python Path
- Using Sublime Text For Python
- Sublime Text Python Run
- Sublime Text Python Autocomplete
- Sublime Text Python 3
I thought I'd document what I've learned about setting up Sublime Text 3 to work with a python virtual environment so that I don't have to look this up multiple times. Hopefully someone else will find this information helpful as well.
Set up the project area
I like to keep all my projects in a parent folder. This way applications like Timing can track that I'm being productive in my chosen terminal application.
Sublime Text 3 is the current version of Sublime Text. For bleeding-edge releases, see the dev builds. Version: Build 3211. Python, with thanks to FichteFoll. Sublime Text for Python development — My 2016 review – When you ask for editor recommendations as a Python developer one of the top choices you’ll hear about is Sublime Text. In this post I’ll review the status of Python development with Sublime Text as of 2016.
Creating the virtual environment
I use the mkvirtualenv wrapper scripts to make the virtual environment. All the projects that I'm currently working with are using virtualenv because they are supporting python 21.
Make sure that the environment is set up without errors
I like to make sure that it's setting up my expected version of python during this step.
Make the activate script executable
I currently see a problem where this script doesn't execute properly. I make sure that it can run. While I'm in that directory I check the versions of pip and python as well.
Note: My Virtualenv isn't in a hidden directory.
Test that the activate really works
60% of the time it works all the time. I don't understand the convention of having a script without the file extension.
Create a directory for this specific project.
Once again, I place this in my home project directory. I like to make sure that I have everything in it's own place so I don't have to think about where stuff is.
Sublime Text Python Setup
Edit the postactivate for the virtualenv
I like to read over it and it acts as a double check that it was generated correctly.
Add a command to the postactivate
I make my virtual environments switch to the project directory that I'm working in when activated. This is just a convinence for me, but I've seen tutorials on how to make it so the virtual environment is brought up when you switch to the directory.
Check that the environment is pointing to the correct version of python
You want to make absolutely sure that this is using the virtual env's python and not your system's. Movavi pdf editor 3 0 14. I think this is pretty important as python 2 is moving to end of life.
Run pip to install any needed libraries.
I read about it done this way because it forces the environment to place the needed libraries within the correct site-packages folder.
Sublime Text Python Input
Checking that the installation worked
Sublime Text Python Path
Disk drill enterprise 3 5 860 download free. Hopefully everything installed cleanly or at least gave an error on why it didn't work.
Clone the project into the directory
In this case, I've got a new python project that I created on github. I create the project on github so that I could use there basic python template and github actions.
Once again, I do this so that I can differentiate multiple projects and versions. We all have projects that aren't finished and this helps me by eliminating wondering what versions things are at.
Using Sublime Text For Python
![Text Text](https://i.stack.imgur.com/C9als.png)
Check that all the files are there
It's all part of 'trust-but-verify'. I've seen a lot of misspellings.
Open the folder in Sublime Text
I've set my mac up to use Sublime Text from the command line.
Set up the Sublime Text project
Sublime Text Python Run
When you create a new Sublime Text project, you can specify how it handles builds and tests. This allows me to specify the exact version of python without having to go to the command line.
Sublime Text Python Autocomplete
After this, I can iterate with my code knowing that everything is set up properly.
Conclusion
Sublime Text Python 3
I'm hoping that future me or someone else finds this informative. It was fun putting it together.
- This might change after January 1st according to PEP 373. ↩