我有两个html5lib。当我尝试更新到tensorflow时,它会出错。
这是conda list
显示的两个html5lib
html5lib 1.0.1 py36_0
html5lib 0.9999999 <pip>
问题是我无法删除或更新它。
当我使用
pip install html5lib
时,会弹出错误消息
Requirement already satisfied: html5lib in /Users/apple/anaconda3/lib/python3.6/site-packages (1.0.1)
Exception:
Traceback (most recent call last):
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 291, in run
resolver.resolve(requirement_set)
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/resolve.py", line 103, in resolve
self._resolve_one(requirement_set, req)
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/resolve.py", line 262, in _resolve_one
check_dist_requires_python(dist)
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/utils/packaging.py", line 46, in check_dist_requires_python
feed_parser.feed(metadata)
File "/Users/apple/anaconda3/lib/python3.6/email/feedparser.py", line 175, in feed
self._input.push(data)
File "/Users/apple/anaconda3/lib/python3.6/email/feedparser.py", line 103, in push
self._partial.write(data)
TypeError: string argument expected, got 'NoneType'
但是当我使用
pip uninstall html5lib
时,会弹出另一个错误
Exception:
Traceback (most recent call last):
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/commands/uninstall.py", line 68, in run
auto_confirm=options.yes, verbose=self.verbosity > 0,
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 660, in uninstall
uninstalled_pathset = UninstallPathSet.from_dist(dist)
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/req/req_uninstall.py", line 355, in from_dist
for path in uninstallation_paths(dist):
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/req/req_uninstall.py", line 50, in unique
for item in fn(*args, **kw):
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_internal/req/req_uninstall.py", line 67, in uninstallation_paths
r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1408, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1404, in get_metadata
value = self._get(self._fn(self.egg_info, name))
File "/Users/apple/anaconda3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1516, in _get
with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/apple/anaconda3/lib/python3.6/site-packages/html5lib-1.0.1.dist-info/RECORD'
有解决此问题的主意吗?