pip安装第三方模块时报错
C:\Users\changhao>pip install apscheduler
Collecting apscheduler
Exception:
Traceback (most recent call last):
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\cli\base_command.py", line 143, in main
status = self.run(options, args)
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\commands\install.py", line 318, in run
resolver.resolve(requirement_set)
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\operations\prepare.py", line 218, in prepare_linked_requirement
req.populate_link(finder, upgrade_allowed, require_hashes)
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\req\req_install.py", line 164, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\index.py", line 572, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\index.py", line 530, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\index.py", line 675, in _get_pages
page = self._get_page(location)
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\index.py", line 793, in _get_page
return _get_html_page(link, session=self.session)
File "c:\users\changhao\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\index.py", line 144, in _get_html_page
"Cache-Control": "max-age=0",
TypeError: get() got an unexpected keyword argument 'headers'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
现在 pip-version 已经是 19.0.1 了。。。。。。
用这个
python -m pip install --upgrade pip
先更新一下, windows系统下报这个错, 也有可能是网络状况不好python直接anaconda搞定一切安装包的问题
多半是 requests 版本与 pip 版本不合, 你可以尝试更新 pip 到最新版本
若不能解决, 请把 requests 和 pip 的版本号贴出来.