The intention is to upgrade the 7.1.2 Pip to 9.0.1, with the result that the python-m pip install--upgrade Pip, which is recommended directly by CMD, always reports the following error:
Installing collected Packages:pip
Found existing Installation:pip 7.1.2
Uninstalling pip-7.1.2:
Successfully uninstalled pip-7.1.2
Rolling back uninstall of PIP
Exception:
Traceback (most recent call last):
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\basec
ommand.py ", line 211, in main
Status = Self.run (options, args)
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\comma
nds\install.py ", line 311, in run
Root=options.root_path,
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\req\r
eq_set.py ", line 646, in install
**kwargs
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\req\r
eq_install.py ", line 803, in install
Self.move_wheel_files (Self.source_dir, Root=root)
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\req\r
eq_install.py ", line 998, in Move_wheel_files
Isolated=self.isolated,
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\wheel
. py ", line 449, in Move_wheel_files
Generated.extend (Maker.make (spec))
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\_vend
or\distlib\scripts.py ", line 353, in Make
Self._make_script (entry, filenames, options=options)
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\_vend
or\distlib\scripts.py ", line 257, in _make_script
Self._write_script (Scriptnames, shebang, script, filenames, ext)
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\_vend
or\distlib\scripts.py ", line 193, in _write_script
Launcher = self._get_launcher (' t ')
File "C:\Users\luofuli\AppData\Roaming\Python\Python27\site-packages\pip\_vend
or\distlib\scripts.py ", line 332, in _get_launcher
result = Finder (distlib_package). Find (name). bytes
Attributeerror: ' Nonetype ' object has no attribute ' bytes '
Back to http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip查看了以下三种安装或者更新pip的方法:
1. Use the get-pip.py script or run
2, Python.exe pip-9.0.1-py2.py3-none-any.whl (download WHL first, link below)
3, pip install PIP-9.0.1-PY2.PY3-NONE-ANY.WHL (download WHL first, link below)
Pip‑9.0.1‑py2.py3‑none‑any.whl
Pro-test Method 1 OK, method 2,3 failure, cause do not know why ~