2017-10-18 251 views
0

我有Anaconda 5.0,Windows 10安装Tensorflow后的pip安装问题

我在Anaconda提示中安装了Tensorflowpip install tensorflow

安装成功。 website上建议的测试按预期工作。

但现在我不能安装任何其他包与pip install。例如,当我运行:

pip install memory-profiler我得到:

Exception: 
Traceback (most recent call last): 
    File "C:\Python\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "C:\Python\Anaconda3\lib\site-packages\pip\commands\install.py", line 335, in run 
    wb.build(autobuilding=True) 
    File "C:\Python\Anaconda3\lib\site-packages\pip\wheel.py", line 749, in build 
    self.requirement_set.prepare_files(self.finder) 
    File "C:\Python\Anaconda3\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files 
    ignore_dependencies=self.ignore_dependencies)) 
    File "C:\Python\Anaconda3\lib\site-packages\pip\req\req_set.py", line 554, in _prepare_file 
    require_hashes 
    File "C:\Python\Anaconda3\lib\site-packages\pip\req\req_install.py", line 278, in populate_link 
    self.link = finder.find_requirement(self, upgrade) 
    File "C:\Python\Anaconda3\lib\site-packages\pip\index.py", line 465, in find_requirement 
    all_candidates = self.find_all_candidates(req.name) 
    File "C:\Python\Anaconda3\lib\site-packages\pip\index.py", line 423, in find_all_candidates 
    for page in self._get_pages(url_locations, project_name): 
    File "C:\Python\Anaconda3\lib\site-packages\pip\index.py", line 568, in _get_pages 
    page = self._get_page(location) 
    File "C:\Python\Anaconda3\lib\site-packages\pip\index.py", line 683, in _get_page 
    return HTMLPage.get_page(link, session=self.session) 
    File "C:\Python\Anaconda3\lib\site-packages\pip\index.py", line 811, in get_page 
    inst = cls(resp.content, resp.url, resp.headers) 
    File "C:\Python\Anaconda3\lib\site-packages\pip\index.py", line 731, in __init__ 
    namespaceHTMLElements=False, 
TypeError: parse() got an unexpected keyword argument 'transport_encoding' 

我怎样才能解决这个问题?运行后


的问题仍然存在:

conda upgrade pip

此外,通过罗密欧,here,所提供的解决方案并不为我工作。

+0

的可能的复制[PIP抛出类型错误:解析()尝试时得到了一个意想不到的关键字参数 '运输\ _encoding'安装新的软件包](https://stackoverflow.com/questions/46499808/pip-throws-typeerror-parse-got-an-unexpected-keyword-argument-transport-enco) – Goyo

回答

1

运行解决:

conda install --force html5lib

(信用:迈克·兰泽塔)