Reputation: 165
So, I've been toying around with python environments and I think i screwed mine up.
So when I ran python in shell, it would tell me i'm running on 2.7
I'm on windows 10, and i need a python switcher for my next project so i download pywin and used pywin to switch it to 3.5
the command i used was
pywin setdefault 3.5
now when i type python it says
python is not recognized as an internal or external command.
but py produces
Python 2.7.12
Now i can't use pip, easy_install, virtualenv
all of these commands i used to use, i suddenly no longer have access to them.
I tried switching back
but it wont even recognize pywin anymore.
Upvotes: 0
Views: 1329
Reputation: 22952
The best way to check which Python version is executed is to check your environment variables. Another way of checking this is using the which command. (open cmd and run which python
).
But, first you need to start a new cmd
prompt to ensure your environment variables are not altered.
On Windows, but also any OS, you need to check the PATH
and PYTHONPATH
variables.
For Windows, follow the recommandations available in the Python documentation.
If you're not very experienced with working with windows, installations, and other similar things, I would recommend that you uninstall python, delete all versions/folders containing python (compiled) files (those that were installed with python, not the ones you've written) and then reinstall python. The installer should re-set the path variable to the correct location.
Upvotes: 2