我正在尝试在新项目中从pipenv开始。这是在空目录中执行pipenv --python 3.7
的日志:
zuber@pushka:~/Projects/test$ pipenv --python 3.7
Creating a virtualenv for this project…
Pipfile: /home/zuber/Projects/test/Pipfile
Using /usr/local/bin/python3.7 (3.7.0) to create virtualenv…
⠇Already using interpreter /usr/local/bin/python3.7
Using base prefix '/usr/local'
/usr/local/lib/python3.7/site-packages/virtualenv.py:1041: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
New python executable in /home/zuber/.local/share/virtualenvs/test-QyM8Q2N5/bin/python3.7
Also creating executable in /home/zuber/.local/share/virtualenvs/test-QyM8Q2N5/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/zuber/.local/share/virtualenvs/test-QyM8Q2N5
requirements.txt found, instead of Pipfile! Converting…
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/packaging/requirements.py", line 93, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 1632, in parseString
raise exc
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 1622, in parseString
loc, tokens = self._parse( instring, 0 )
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 3395, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 3717, in parseImpl
return self.expr._parse( instring, loc, doActions, callPreParse=False )
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 3378, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/pyparsing.py", line 2689, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pipenv.patched.notpip._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 "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 253, in from_line
req = Requirement(req)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/packaging/requirements.py", line 97, in __init__
requirement_string[e.loc:e.loc + 8]))
pipenv.patched.notpip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'_tflow_1'"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1114, in invoke
return Command.invoke(self, ctx)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/cli/command.py", line 203, in cli
clear=state.clear,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 597, in ensure_project
validate=validate, skip_requirements=skip_requirements, system=system
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 302, in ensure_pipfile
import_requirements()
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 224, in import_requirements
reqs = [f for f in parse_requirements(r, session=pip_requests)]
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 224, in <listcomp>
reqs = [f for f in parse_requirements(r, session=pip_requests)]
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/req/req_file.py", line 89, in parse_requirements
for req in req_iter:
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/req/req_file.py", line 156, in process_line
isolated=isolated, options=req_options, wheel_cache=wheel_cache
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 263, in from_line
"Invalid requirement: '%s'\n%s" % (req, add_msg))
pipenv.patched.notpip._internal.exceptions.InstallationError: Invalid requirement: '_tflow_1100_select=0.0.3=mkl'
= is not a valid operator. Did you mean == ?
我想tflow是我过去在anaconda envs中使用的tensorflow
。但是在我删除了所有anaconda env之后,它继续抛出了这个令人讨厌的异常。无论如何,Pipenv
文件已创建,但我希望此错误消失。