我有一个程序,我非常需要依赖列表,但pip freeze
不起作用。我正在运行CentOS 7和Python 2.7.5
该程序在Python 2.4上运行(我在另一个终端上做别名,是的,我确实从该终端尝试了pip freeze
)和fortran95。我肯定已经安装了pip。我尝试升级Python2.7,但它说没关系。
pip的错误如下。
[root@localhost rotate6]# pip freeze
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/freeze.py", line 85, in run
for line in freeze(**freeze_kwargs):
File "/usr/lib/python2.7/site-packages/pip/operations/freeze.py", line 47, in freeze
dependency_links
File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 264, in from_dist
req = dist.as_requirement()
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2562, in as_requirement
return Requirement.parse(spec)
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2833, in parse
req, = parse_requirements(s)
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2781, in parse_requirements
yield Requirement(line)
File "/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2790, in __init__
raise RequirementParseError(str(e))
RequirementParseError: Invalid requirement, parse error at "'-ipap11h'"
答案 0 :(得分:0)
这是一个已知问题。见https://github.com/pypa/pip/issues/3764
建议尝试将您的pip
版本降级为不太严格的版本(有些人认为8.1.0有效),或者卸载有问题的软件包,这似乎是_ipap11helper