我正在尝试在python中安装一个包并收到一个相当混乱的错误。尝试安装任何软件包时,甚至在尝试更新pip时都会发生这种情况。我假设'module'对象没有'comment'属性是我的问题,但我来自C#背景,旁边没有python经验。这个问题的解决方案是什么,或者我将从哪里开始寻找?
Collecting netaddr
Exception:
Traceback (most recent call last):
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\basecommand.py", line 228, in main
status = self.run(options, args)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\commands\install.py", line 291, in run
resolver.resolve(requirement_set)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\resolve.py", line 103, in resolve
self._resolve_one(requirement_set, req)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\resolve.py", line 257, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\resolve.py", line 210, in _get_abstract_dist_for
self.require_hashes
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\operations\prepare.py", line 245, in prepare_linked_requirement
req.populate_link(finder, upgrade_allowed, require_hashes)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\req\req_install.py", line 307, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\index.py", line 484, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\index.py", line 442, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\index.py", line 587, in _get_pages
page = self._get_page(location)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\index.py", line 705, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\index.py", line 833, in get_page
inst = cls(resp.content, resp.url, resp.headers)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_internal\index.py", line 753, in __init__
namespaceHTMLElements=False,
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\html5lib\html5parser.py", line 45, in parse
tb = treebuilders.getTreeBuilder(treebuilder)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\html5lib\treebuilders\__init__.py", line 85, in getTreeBuilder
return etree.getETreeModule(implementation, **kwargs).TreeBuilder
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\html5lib\_utils.py", line 101, in moduleFactory
objs = factory(baseModule, *args, **kwargs)
File "C:\Python27\ArcGISx6410.5\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\html5lib\treebuilders\etree.py", line 19, in getETreeBuilder
ElementTreeCommentType = ElementTree.Comment("asd").tag
AttributeError: 'module' object has no attribute 'Comment'