我无法让 pip2 工作。
我需要 pip2,因为我需要使用 python3 pip 不支持的旧版 tensorflow。尝试运行时pip2 install我得到这个:
Traceback (most recent call last):
File "/usr/bin/pip2", line 11, in <module>
load_entry_point('pip==20.1.1', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/lib/python2.7/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 24, in <module>
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
File "/usr/lib/python2.7/site-packages/pip/_internal/cli/req_command.py", line 21, in <module>
from pip._internal.req.constructors import (
File "/usr/lib/python2.7/site-packages/pip/_internal/req/constructors.py", line 21, in <module>
from pip._vendor.pkg_resources import RequirementParseError, parse_requirements
ImportError: cannot import name RequirementParseError
我卸载了 pip2 并重新安装了它。对 pip(3) 也做了同样的事情。但这并没有改变一件事。我在这个错误消息中找不到任何有用的信息,感到有点无助。有任何想法吗?
update忘了说,我用的是 archlinux。我安装它pacman -S python2-pip
拉风的咖菲猫
MMTTMM
jeck猫
相关分类