gpt4 book ai didi

python - pip 版本 virtualenv 不匹配,不会升级

转载 作者:可可西里 更新时间:2023-11-01 14:16:59 26 4
gpt4 key购买 nike

好的,那么,我在虚拟环境中运行我的项目包。我通常通过 PyCharm 来管理这些包。 PyCharm 告诉我我已经安装了 Pip 9.0.1。只有当我从命令行运行虚拟环境并打印 pip 版本时,它才会显示 7.1.0。如果我尝试使用 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 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,顺便说一下。

最佳答案

我遇到了同样的问题,但在这里找到了答案: https://github.com/pypa/pip/issues/2669

基本上我只需要改用这个命令:easy_install -U pip

关于python - pip 版本 virtualenv 不匹配,不会升级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41548905/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com