Reputation: 53
I'm using windows xp.
I'm trying to use Python in powershell. On my computer I have both Python 3.3 and 2.7 installed. I'm trying to run 2.7 but whenever I type "python" into powershell it opens 3.3.
How do I select the version of Python to run?
Upvotes: 5
Views: 13471
Reputation: 1964
In powershell, enter the following:
$Env:PY_PYTHON = 2
Then try using the command "py". It should start up Python 2.7. If you ever want to run Python 3.3 again, "py -3" will do the trick.
Upvotes: 10
Reputation: 7889
Something like Python Select? Windows support is experimental but it might be worth a try.
https://github.com/Activestate/pythonselect
There's also switchpy, although that only supports up to Python 3.2.
apipes.blogspot.com/2010/10/switchpy.html?m=1
Upvotes: 1