Skip to content Skip to sidebar Skip to footer

Python: How To Access 3.3 If 3.4 Is The Default?

Running Windows 7. 2.7, 3.3 and 3.4 installed. I just installed Python 3.3 for a recent project. In the command prompt, python launches 3.4, and py launches 3.3. I can access 3.

Solution 1:

If you want to male a file specifically open with a version you can start the file with #! python3.x the x being the version you want. If you want to be able to right click and edit with that version youll need to do some tweaking in the registry

Solution 2:

To make it so you can run the different versions of Python from the command prompt, go into C:\Python33 and C:\Python34 and make copies of the python.exe that resides there. Rename the copy to python33.exe and python34.exe, respectively, then you can just run

python33 file.py

or

python34 file.py

from the command prompt, and you'll be assured the correct version will be used. I'd also make a copy of the python.exe in C:\Python27 and name it python2.exe, just so you can specify that version when needed, if you don't remember the search order of your Python directories in your PATH environment variable.

Post a Comment for "Python: How To Access 3.3 If 3.4 Is The Default?"