在Windows 8.1(python 2.7)上升级到pip 7.1.10时出错

Pro*_*eus 5 pip python-2.7 windows-8.1

$ C:\Python27> pip install --upgrade pip

You are using pip version 6.0.8, however version 7.1.0 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

Collecting pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-7.1.0-py2.py3-none-any.whl#md5=b108384a762825ec20
345bb9b5b7209f

Using cached pip-7.1.0-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 6.0.8
    Uninstalling pip-6.0.8:
      Successfully uninstalled pip-6.0.8
Run Code Online (Sandbox Code Playgroud)

先前版本的pip已经消失,但之后我得到了这个例外:

  Rolling back uninstall of pip
  Exception:
  Traceback (most recent call last):


File "c:\python27\lib\site-packages\pip-6.0.8-py2.7.egg\pip\basecommand.py", line 232, in main status = self.run(options, args) 
                               .
                               .
                               .

  AttributeError: 'NoneType' object has no attribute 'bytes'
Run Code Online (Sandbox Code Playgroud)

我有升级setuptools分发 ,我也尝试安装pip manualy并得到了这个:

$ C:\Python27> pip install 7.1.10
You are using pip version 6.0.8, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting 7.1.10
  Could not find any downloads that satisfy the requirement 7.1.10
  No distributions at all found for 7.1.10 
Run Code Online (Sandbox Code Playgroud)

the*_*232 7

我遇到了同样的问题,然后我咨询了pip文档,这就是他们建议升级pip的方式:

对于Windows:

python -m pip install -U pip
Run Code Online (Sandbox Code Playgroud)

对于Linux:

pip install -U pip
Run Code Online (Sandbox Code Playgroud)

如需进一步参考,请查看此链接

  • 正如其他人建议的那样,我必须在虚拟环境中运行“ easy_install -U pip” (2认同)

x29*_*29a 6

该错误报告建议您执行

easy_install -U pip