我会在尝试通过pip安装任何python软件包时在parse()中编码关键字。
自从我为Python 3.6安装TensorFlow以来,我会遇到这个问题,这可能导致了HTML5LIB和SETUPTOUMS的某些问题。已经使用tar.gz文件(admin install)重新安装了html5lib1.0b10,但仍然存在问题。请帮助!
pip install spacy
Collecting spacy
Exception:
Traceback (most recent call last):
File "C:ProgramDataAnaconda3libsite-packagespipbasecommand.py", line 215, in main
status = self.run(options, args)
File "C:ProgramDataAnaconda3libsite-packagespipcommandsinstall.py", line 335, in run
wb.build(autobuilding=True)
File "C:ProgramDataAnaconda3libsite-packagespipwheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:ProgramDataAnaconda3libsite-packagespipreqreq_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:ProgramDataAnaconda3libsite-packagespipreqreq_set.py", line 554, in _prepare_file
require_hashes
File "C:ProgramDataAnaconda3libsite-packagespipreqreq_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:ProgramDataAnaconda3libsite-packagespipindex.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:ProgramDataAnaconda3libsite-packagespipindex.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:ProgramDataAnaconda3libsite-packagespipindex.py", line 568, in _get_pages
page = self._get_page(location)
File "C:ProgramDataAnaconda3libsite-packagespipindex.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:ProgramDataAnaconda3libsite-packagespipindex.py", line 811, in get_page
inst = cls(resp.content, resp.url, resp.headers)
File "C:ProgramDataAnaconda3libsite-packagespipindex.py", line 731, in __init__
namespaceHTMLElements=False,
TypeError: parse() got an unexpected keyword argument 'transport_encoding'
确实是在html5lib和setuptools的情况下,我使用
重新安装了html5libconda install -c anaconda html5lib
尽管包装版本相同,但它说"以下包装将被更高优先级的频道取代",并安装了conda,conda-env,html5lib。我不确定更高优先级的频道部分。但这回答了我的问题!
安装tensorflow 1.3.0
。
重新安装html5lib
。
conda uninstall html5lib --force
conda install html5lib
暂时解决问题,直到下一个pip install --upgrade tensorflow
。pip install --upgrade tensorflow-gpu
也有同样的问题。