python – pip throws TypeError:parse()在尝试安装新包时得到
发布时间:2020-12-20 10:32:08 所属栏目:Python 来源:网络整理
导读:我使用的是最新版本的Anaconda3.我刚安装它,我正在尝试下载一些软件包.我正在使用Anaconda Prompt.在尝试使用pip执行任何操作(包括升级现有包)时,我得到以下回溯. Exception:Traceback (most recent call last): File "C:UserscsprockAnaconda3libsite-
我使用的是最新版本的Anaconda3.我刚安装它,我正在尝试下载一些软件包.我正在使用Anaconda Prompt.在尝试使用pip执行任何操作(包括升级现有包)时,我得到以下回溯.
Exception: Traceback (most recent call last): File "C:UserscsprockAnaconda3libsite-packagespipbasecommand.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-packagespipreqreq_set.py",line 380,in prepare_files ignore_dependencies=self.ignore_dependencies)) File "C:UserscsprockAnaconda3libsite-packagespipreqreq_set.py",line 487,in _prepare_file req_to_install,finder) File "C:UserscsprockAnaconda3libsite-packagespipreqreq_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后才开始)谢谢. 解决方法
我有同样的问题,对我有用的是用conda更新pip:
conda install pip 它将我的点从9.0.1-py36hadba87b_3改为9.0.1-py36h226ae91_4并解决了问题. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |