Using Sublime Text 3, how can I build a python file using a conda environment that I\'ve created as in http://conda.pydata.org/docs/using/envs.html
In Linux Mint, I kept having trouble getting sublime to run python scripts using Anaconda's environment and Anaconda's installed version of python. I was running the following script to check which python was being used:
import sys
print(sys.version)
I followed THIS procedure on the Anaconda site, but I had to do one additional thing to get sublime to use the Anaconda environment and run python scripts using its python environment.
After choosing "conda" as my build system, I had to access the Command Palette (Tools -> Command Palette ...), and then I typed "conda", which shows you all of the options for controlling conda from inside Sublime, and I had to chose "Conda: Activate Environment", which shows all "conda" environments that have been created. I only had the original environment at this point, so it only gave me that one choice. I chose it, and then my script used the Anaconda environment, and its python version correctly.
FURTHERMORE, I noticed that if I wanted to switch to another virtual environment that I had previously created on my system before using Anaconda, I did have to activate that environment from inside Sublime first. I could then use the build system choice "Python + Virtualenv" to use that activated environment. Fortunately, the conda environment was still activated, and I only needed to use the build system choice of "conda" to switch back to it.