All my current coding has been in python 3, which I\'ve installed via the Anaconda package. However I need to work on some code simultaneously in python 2. Is there a way I
1, intall pyhton3: https://www.python.org/downloads/
2, find the file "python.exe" and rename to "python3.exe"
3, in Windows command line:
where python3.exe
Save this ubication wherever you want.
4, In sublime goto -> Tools -> Build system -> New build system (this open a file)
5, finally the ubication file of number 3, only change the ubication:
{
/*replace this*/"cmd": ["C:/Users/youruser/AppData/Local/Programs/Python/Python37-32/python3.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"shell": true
}
Save the file like "python3".
6, In sublime go to Tools -> Build system -> Select python3 and you can run this code in python 3.
7, Show your python version:
import sys
print(sys.version)
If you want to run in python 2, then go to Tools -> Build system -> Select "Python"