This is the continuation of this tutorial: http://algidus.blogspot.com/2017/12/installing-python-3-and-2-in-windows-10.html
We will now set up Sublime Text 3 to run codes of both Python 2 and 3.
{
"cmd": ["C:/Python27/python", "-i", "-u", "$file"],
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
"selector": "source.python"
}
Now you can run code in different versions of Python by changing the "Build System" before building the code.
To check the version of Python where the code is being built, you can copy paste the following code, save it as anyname.py and build [Ctrl + B] or Tools > Build
import sys
print(sys.version)
Coding on Sublime is not very recommended, since there are better IDEs like VSCode or PyCharm with tons of features to make coding easier.Using VSCode with Anaconda (or Miniconda) is what I personally prefer so far. Further I prefer Miniconda because it comes with very few packages preinstalled (since I mostly install required packages myself, I prefer this)
See: https://algidus.blogspot.com/2023/03/vscode-jupyter-notebook-error.html