python的pip更新报错问题实例和解决方案
python -m pip install --upgrade pip Collecting pip Using cached https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 9.0.1 Uninstalling pip-9.0.1: Successfully uninstalled pip-9.0.1 Rolling back uninstall of pip Exception: Traceback (most recent call last): File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\basecommand.py", line 215, in main status = self.run(options, args) File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\commands\install.py", line 342, in run prefix=options.prefix_path, File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\req\req_set.py", line 784, in install **kwargs File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\req\req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\req\req_install.py", line 1064, in move_wheel_files isolated=self.isolated, File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\wheel.py", line 462, in move_wheel_files generated.extend(maker.make(spec)) File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\_vendor\distlib\scripts.py", line 372, in make self._make_script(entry, filenames, options=options) File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\_vendor\distlib\scripts.py", line 276, in _make_script self._write_script(scriptnames, shebang, script, filenames, ext) File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\_vendor\distlib\scripts.py", line 212, in _write_script launcher = self._get_launcher('t') File "E:\Python34\lib\site-packages\pip-9.0.1-py3.4.egg\pip\_vendor\distlib\scripts.py", line 351, in _get_launcher result = finder(distlib_package).find(name).bytes AttributeError: 'NoneType' object has no attribute 'bytes' You are using pip version 9.0.1, however version 10.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
解决方案:更新指令替换为python -m pip install -U --force-reinstall pip