I have python 3.7 and Python 3.10 both installed on my computer. However, when I launch it from cmd by typing 'python' it launches python 3.7 instead of 3.10. Howe to launch 3.10 specifically? Also, I have Pycharm which currently runs on 3.7, so, how to run it on 3.10?
CodePudding user response:
You must edit your PATH
variable to link to Python 3.10, currently you have it linked to Python 3.7
Search for Edit Environment Variables, click the Environment Variables, Go to Path, and edit python to link to the Python 3.10 directory.
CodePudding user response:
- Add
C:\Python35;C:\Python35\Scripts;C:\Python27;C:\Python27\Scripts
to environment variable PATH. - Restart your command window.
- Type python2 scriptname.py, or python3 scriptname.py in command line to switch the version you like.
If this does not work, you can reinstall version of python.