本文介绍了如何更新Python版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7上安装了Python2.6,并且刚刚安装了Python2.7.结果,我有了"C:\ Python26"和"C:\ Python27".

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

我的问题是系统仍然尝试使用旧版本.例如,如果键入Python --version,则会得到"Python 2.6.4".或者,如果我尝试安装"numpy",它将找到旧版本,并且不允许我手动将其更改为新版本.

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.

我试图检查系统环境变量以找出是否有Python2.6(用Python2.7代替),但是我没有找到类似的东西.

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.

推荐答案

您需要将Python路径更改为新版本.

You need to change Python path to the new version.

http://docs.python.org/using/windows.html#excursus环境设置变量

这篇关于如何更新Python版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 10:38