码迷,mamicode.com
首页 > 其他好文 > 详细

pip install –r ./requirements.txt 报错 改成 pip install -r requirements.txt 成功

时间:2019-03-29 14:43:44      阅读:2013      评论:0      收藏:0      [点我收藏+]

标签:red   ring   home   trace   pyenv   string   dash   expr   ons   

Invalid requirement: ‘–r‘
Traceback (most recent call last):
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 92, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1617, in parseString
raise exc
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1607, in parseString
loc, tokens = self._parse( instring, 0 )
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3376, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3698, in parseImpl
return self.expr._parse( instring, loc, doActions, callPreParse=False )
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3359, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 2670, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/req/req_install.py", line 82, in __init__
req = Requirement(req)
File "/home/dev/.pyenv/versions/3.6.1/envs/env361/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "‘–r‘"

pip install –r ./requirements.txt 报错 改成 pip install -r requirements.txt 成功

标签:red   ring   home   trace   pyenv   string   dash   expr   ons   

原文地址:https://www.cnblogs.com/stillstep/p/10620900.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!