How to update version of Python?

2019-04-24 12:52发布

问题:

I had Python2.6 on my Windows 7 and I just installed Python2.7. As a result I have "C:\Python26" and "C:\Python27".

My problem is that system still tries to use the old version. For example if I type Python --version I get "Python 2.6.4". Or, if I try to install "numpy" it find the old version and does not allow me to manually change it to the new version.

I tried to check system environment variables to find out if there is Python2.6 (to replace it by Python2.7) but I did not find anything like that.

回答1:

You need to change Python path to the new version.

http://docs.python.org/using/windows.html#excursus-setting-environment-variables