本文共 2482 字,大约阅读时间需要 8 分钟。
python -m pip install --upgrade pip
问题:
Collecting pip Using cached pip-9.0.1-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 8.1.2 Uninstalling pip-8.1.2: Successfully uninstalled pip-8.1.2 Rolling back uninstall of pip Exception: Traceback (most recent call last): File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.egg\pip\basecommand.py", line 215, in main status = self.run(options, args) File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.egg\pip\commands\install.py", line 317, in run prefix=options.prefix_path, File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.egg\pip\req\req_set.py", line 742, in install **kwargs File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.egg\pip\req\req_install.py", line 831, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.egg\pip\req\req_install.py", line 1032, in move_wheel_files isolated=self.isolated, File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.egg\pip\wheel.py", line 463, in move_wheel_files generated.extend(maker.make(spec)) File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.egg\pip\_vendor\distlib\scripts.py", line 372, in make self._make_script(entry, filenames, options=options) File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.egg\pip\_vendor\distlib\scripts.py", line 276, in _make_script self._write_script(scriptnames, shebang, script, filenames, ext) File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.egg\pip\_vendor\distlib\scripts.py", line 212, in _write_script launcher = self._get_launcher('t') File "D:\python3.5.2\lib\site-packages\pip-8.1.2-py3.5.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 8.1.2, however version 9.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.You are using pip version 8.1.2, however version 9.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
Collecting pip
Using cached pip-9.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 Successfully installed pip-9.0.1参考https://github.com/pypa/pip/issues/2669
转载地址:http://dylbi.baihongyu.com/