我尝试升级使用MacOS High Sierra v 10.13.6失败的robotframework。然后,我尝试将其卸载以进行全新安装。当我尝试使用pip时,现在出现以下错误。我正在使用python 2.7.15和pip版本19.0.1。 有关如何解决此问题的任何建议将不胜感激
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip-19.0.1-py2.7.egg/pip/_internal/cli/base_command.py", line 176, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip-19.0.1-py2.7.egg/pip/_internal/commands/freeze.py", line 93, in run
for line in freeze(**freeze_kwargs):
File "/usr/local/lib/python2.7/site-packages/pip-19.0.1-py2.7.egg/pip/_internal/operations/freeze.py", line 62, in freeze
req = FrozenRequirement.from_dist(dist)
File "/usr/local/lib/python2.7/site-packages/pip-19.0.1-py2.7.egg/pip/_internal/operations/freeze.py", line 239, in from_dist
req = dist.as_requirement()
File "/usr/local/lib/python2.7/site-packages/pip-19.0.1-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 2716, in as_requirement
if isinstance(self.parsed_version, packaging.version.Version):
File "/usr/local/lib/python2.7/site-packages/pip-19.0.1-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 2551, in parsed_version
self._parsed_version = parse_version(self.version)
File "/usr/local/lib/python2.7/site-packages/pip-19.0.1-py2.7.egg/pip/_vendor/pkg_resources/__init__.py", line 2589, in version
raise ValueError(tmpl % self.PKG_INFO, self)
ValueError: ("Missing 'Version:' header and/or METADATA file", Unknown [unknown version] (/usr/local/lib/python2.7/site-packages))
答案 0 :(得分:0)
似乎是与pip最新版本有关的问题:
有人通过从python site-packages目录中删除剩余数据来修复其系统:
C:\ Python27 \ Lib \ site-packages \ robot
在site-packages目录中也会有类似的内容,也应该删除:
./ robot-3.1.dist-info / METADATA
也许降级点数也可能有助于避免此问题,尽管我在票证中未提及该点。