问题描述
因此,我在Windows 7 64位上安装了python 2.7.3,我想将其增量升级到2.7.5版.我已经安装了点子,并且工作正常;我刚刚使用它安装了Django.
So I have python 2.7.3 installed on Windows 7 64 bit and I want to do an incremental upgrade to version 2.7.5. I have pip installed and it works fine; I just installed Django using it.
我遇到了以下命令:pip install --upgrade'python> = 2.7,< 2.7.99'
I ran into this command:pip install --upgrade 'python>=2.7,<2.7.99'
现在,它会强制pip下载我想要的不是Python 3的最新版本.2.7.5开始下载,出现以下错误:
Now it forces pip to download the latest version that is not Python 3 which is what I want.2.7.5 starts downloading and I get the following error:
Downloading/unpacking python>=2.7,<2.7.99
Downloading Python-2.7.5.tar.bz2 (12.1MB): 12.1MB downloaded
Running setup.py egg_info for package python
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\users\name\appdata\local\temp\pip-build-name\python\setup.py", line 33, in <module>
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
TypeError: argument of type 'NoneType' is not iterable
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\users\name\appdata\local\temp\pip-build-name\python\setup.py", line 33, in <module>
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
TypeError: argument of type 'NoneType' is not iterable
----------------------------------------
Command python setup.py egg_info failed with error code 1 in c:\users\name\appdata\local\temp\pip-build-name\python
我也是新手.当我取消下载时,这样安全吗?我输入install"pip install python",它开始下载版本python版本3.因此我取消了.那不会覆盖我的主要python 2.7.3安装吗?
Also I am new to pip. When I cancel a download is that safe? I typed install "pip install python" and it started downloading version python version 3. So I cancelled. That won't override my main python 2.7.3 install?
很好奇.
推荐答案
pip
旨在升级python软件包,而不是升级python本身.当您要求pip
升级python时,请勿尝试这样做.
pip
is designed to upgrade python packages and not to upgrade python itself. pip
shouldn't try to upgrade python when you ask it to do so.
请勿键入pip install python
,而应使用安装程序.
Don't type pip install python
but use an installer instead.
这篇关于使用pip升级python版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!