2
好吧,我在虛擬環境中運行我的項目包。我通常通過PyCharm管理這些軟件包。 PyCharm告訴我我已經安裝了Pip 9.0.1。只有當我從命令行運行我的虛擬環境並打印pip版本時,它會顯示7.1.0。如果我嘗試使用升級我pip install --upgrade pip
得到一個錯誤Pip版本virtualenv不匹配,不會升級
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 7.1.0
Uninstalling pip-7.1.0:
Successfully uninstalled pip-7.1.0
Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\basecommand.py", line 223, in main
status = self.run(options, args)
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\commands\install.py", line 299, in run
root=options.root_path,
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\req\req_set.py", line 646, in install
**kwargs
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\req\req_install.py", line 813, in install
self.move_wheel_files(self.source_dir, root=root)
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\req\req_install.py", line 1008, in move_wheel_files
isolated=self.isolated,
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\wheel.py", line 449, in move_wheel_files
generated.extend(maker.make(spec))
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\_vendor\distlib\scripts.py", line 323, in make
self._make_script(entry, filenames, options=options)
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\_vendor\distlib\scripts.py", line 227, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\_vendor\distlib\scripts.py", line 163, in _write_script
launcher = self._get_launcher('t')
File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\_vendor\distlib\scripts.py", line 302, in _get_launcher
result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'
我的系統級PIP版本是9.0.1,雖然。我只是不知道發生了什麼。希望有人能夠闡明一些看法。我已嘗試重新安裝並重新安裝它,我嘗試使用安裝輪子,不起作用
Windows,順便說一下。
你的機器上可能有不同版本的Python ,比如Python 2和Python 3,每個都有自己的'pip'版本。當你使用'virtualenv'時,它會默認安裝python(你可以選擇的版本)和合適的點。然後在虛擬環境中,您可以根據需要升級'pip'。 – oliversm
@oliversm是的,這是問題,我不能升級它。錯誤日誌在問題中 –