pip安装第三方模块时报错

发布于 2022-09-11 17:30:33 字数 2436 浏览 16 评论 0

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

楠木可依 2022-09-18 17:30:33

现在 pip-version 已经是 19.0.1 了。。。。。。
用这个python -m pip install --upgrade pip先更新一下, windows系统下报这个错, 也有可能是网络状况不好

后eg是否自 2022-09-18 17:30:33

python直接anaconda搞定一切安装包的问题

瞄了个咪的 2022-09-18 17:30:33

多半是 requests 版本与 pip 版本不合, 你可以尝试更新 pip 到最新版本

pip install -U pip

若不能解决, 请把 requestspip 的版本号贴出来.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文