使用pip安装时出现transport_encoding错误 [英] transport_encoding error during installing with pip

查看:148
本文介绍了使用pip安装时出现transport_encoding错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试通过pip安装任何python软件包时,我在parse()中得到了意外的arg:关键字编码.

I'm getting unexpected arg: keyword encoding in parse() while trying to install any python package through pip.

我遇到了这个问题,因为我为python 3.6安装了tensorflow,这可能导致html5lib和setuptools出现了一些问题.已使用tar.gz文件(管理员安装)重新安装了html5lib1.0b10,但问题仍然存在. 请帮忙!

I'm getting this problem since i installed tensorflow for python 3.6, which probably led to some issue with html5lib and setuptools. Have reinstalled html5lib1.0b10 using tar.gz file (admin install) but the issue still remains. Please help!!

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

推荐答案

问题确实与html5lib和setuptools有关,我使用

Issue was indeed with html5lib and setuptools, I re-installed html5lib using

conda install -c anaconda html5lib

尽管软件包版本相同,但表示将通过更高优先级的渠道支持以下软件包",并安装了conda,conda-env和html5lib.我不确定优先级较高的渠道部分. 但这回答了我的问题!

Although package versions were same, it said 'The following packages will be SUPERSEDED by a higher-priority channel', and installed conda, conda-env, html5lib. I'm unsure about higher-priority channel part. But this answered my problem!!

这篇关于使用pip安装时出现transport_encoding错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆