pip throws TypeError: parse() got an unexpected keyword argu

pip throws TypeError: parse() got an unexpected keyword argument #39;transport_encoding#39; when trying to install new packages(pip throws TypeError: parse() got an unexpected keyword argument transport_encoding 在尝试安装新软件包时) - IT屋
本文介绍了pip throws TypeError: parse() got an unexpected keyword argument 'transport_encoding' 在尝试安装新软件包时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在使用最新版本的 Anaconda3.我刚刚安装了它,我正在尝试下载一些软件包.我正在使用 Anaconda 提示.在尝试使用 pip 做任何事情(包括升级现有软件包)时,我得到以下回溯.

I am using the latest version of Anaconda3. I just installed it and I am trying to download some packages. I am using the Anaconda Prompt. While trying to use pip to do anything (including upgrading existing packages) I get the following traceback.

    Exception:
Traceback (most recent call last):
  File "C:UserscsprockAnaconda3libsite-packagespipasecommand.py", line 215, in main
    status = self.run(options, args)
  File "C:UserscsprockAnaconda3libsite-packagespipcommandsinstall.py", line 335, in run
    wb.build(autobuilding=True)
  File "C:UserscsprockAnaconda3libsite-packagespipwheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "C:UserscsprockAnaconda3libsite-packagespip
eq
eq_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "C:UserscsprockAnaconda3libsite-packagespip
eq
eq_set.py", line 487, in _prepare_file
    req_to_install, finder)
  File "C:UserscsprockAnaconda3libsite-packagespip
eq
eq_set.py", line 428, in _check_skip_installed
    req_to_install, upgrade_allowed)
  File "C:UserscsprockAnaconda3libsite-packagespipindex.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "C:UserscsprockAnaconda3libsite-packagespipindex.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "C:UserscsprockAnaconda3libsite-packagespipindex.py", line 568, in _get_pages
    page = self._get_page(location)
  File "C:UserscsprockAnaconda3libsite-packagespipindex.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "C:UserscsprockAnaconda3libsite-packagespipindex.py", line 811, in get_page
    inst = cls(resp.content, resp.url, resp.headers)
  File "C:UserscsprockAnaconda3libsite-packagespipindex.py", line 731, in __init__
    namespaceHTMLElements=False,
TypeError: parse() got an unexpected keyword argument 'transport_encoding'

有什么想法吗?(这个问题只有在我安装了 tensorflow 之后才开始)谢谢.

Any ideas? (this problem only started after I installed tensorflow) Thanks.

推荐答案

我遇到了同样的问题,对我有用的是用 conda 更新 pip:

I had the same problem and what worked for me was updating pip with conda:

conda install pip

它将我的点从 9.0.1-py36hadba87b_3 更改为 9.0.1-py36h226ae91_4 并解决了问题.

It changed my pip from 9.0.1-py36hadba87b_3 to 9.0.1-py36h226ae91_4 and solved issue.

这篇关于pip throws TypeError: parse() got an unexpected keyword argument 'transport_encoding' 在尝试安装新软件包时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

python arbitrarily incrementing an iterator inside a loop(python在循环内任意递增迭代器)
Joining a set of ordered-integer yielding Python iterators(加入一组产生 Python 迭代器的有序整数)
Iterating over dictionary items(), values(), keys() in Python 3(在 Python 3 中迭代字典 items()、values()、keys())
What is the Perl version of a Python iterator?(Python 迭代器的 Perl 版本是什么?)
How to create a generator/iterator with the Python C API?(如何使用 Python C API 创建生成器/迭代器?)
Python generator behaviour(Python 生成器行为)