• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

安装pip库报错Could not find a version that satisfies the requirement charset-normalizer<4,>=2 (from reque

武飞扬头像
火花running
帮助3

直接安装Python的pip库yfinance,采用命令pip install yfinance后, 出现以下报错

Could not find a version that satisfies the requirement charset-normalizer<4,>=2 (from requests>=2.26->yfinance) (from versions: )
No matching distribution found for charset-normalizer<4,>=2 (from requests>=2.26->yfinance)

学新通

方法:

1. 采用国内镜像,输入命令
pip install yfinance -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com,即可解决。

2. 如果未成功,遇到了如下情况,显示报错
Failed cleaning build dir for cryptography
Failed to build cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
则可以更新一下pip

学新通

3. 更新pip库,采用命令
pip install --upgrade pip
升级成功,即显示Successfully installed pip-23.0.1

4. 再次重新安装所需要的库yfinance

再次,输入命令pip install yfinance -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
即成功安装了yfinance库,显示如下:
Successfully installed appdirs-1.4.4 beautifulsoup4-4.11.2 charset-normalizer-3.0.1 cryptography-39.0.1 frozendict-2.3.5 html5lib-1.1 lxml-4.9.2 multitasking-0.0.11 numpy-1.21.6 pandas-1.3.5 pytz-2022.7.1 requests-2.28.2 yfinance-0.2.12

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfibhia
系列文章
更多 icon
同类精品
更多 icon
继续加载