[英]pip installing packages failed
With PyCharm I tried to add a project interpreter for my Docker container 使用PyCharm我尝试为我的Docker容器添加一个项目解释器
but then I get this incomprehensible error. 但是然后我得到了这个难以理解的错误。
Invalid requirement: 'redis\>=2.10.5'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 82, in __init__
req = Requirement(req)
File "/usr/local/lib/python2.7/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "'\\>=2.10.'
What can I do about it? 我该怎么办?
From the official documentation of pip
: 从
pip
的官方文档中:
https://pip.pypa.io/en/stable/reference/pip_install/#examples https://pip.pypa.io/en/stable/reference/pip_install/#examples
$ pip install SomePackage # latest version
$ pip install SomePackage==1.0.4 # specific version
$ pip install 'SomePackage>=1.0.4' # minimum version
It seems you have to use apostrophes for a minimum version. 看来您必须为最小版本使用撇号。
Backslash in redis\\>=2.10.5
is the culprit of the problem. redis\\>=2.10.5
中的反斜杠是问题的redis\\>=2.10.5
。 Replace redis\\>=2.10.5
with 'redis>=2.10.5'
. 将
redis\\>=2.10.5
替换为'redis>=2.10.5'
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.