简体   繁体   English

点安装包失败

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM