首页 > Python资料 博客日记
python安装matplotlib包报错:ERROR: Could not find a version that satisfies the requirement matplotlib
2024-03-03 21:00:05Python资料围观135次
python安装matplotlib包报错:ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)ERROR 以及其他ERROR: Could not find a version that satisfies the requirement xxx包 (from versions: none)的解决方案
遇到的问题
一个项目需要用到matplotlib包,但是发现之前没有安装过,故习惯性按照如下方法尝试安装
file->setting->project:项目名>python interpreter->搜索 matplotlib->install->报错 ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)ERROR
结果报错版本不匹配。。下面开始找解决方法
失败的过程
不知道是不是pip的问题?尝试更新pip
打开安装py的可执行文件的位置,然后
python.exe -m pip install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
已经是最新了,看来和pip版本没关系
考虑国内的网络情况,用镜像源发现可以连接到,但是网速只有0.1kb/s,没办法只能再换
pip install 包名 -i -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
(忘记截图了这里)
最终解决方案
最后找到了清华的镜像,这次很快啊,瞬间下载完成
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib
附上成功截图
举一反三
看来主要原因还是网络问题,需要找一个靠谱的镜像。经过此次教训,诸如此类报错:ERROR: Could not find a version that satisfies the requirement xxx包 (from versions: none)
只需使用清华镜像https://pypi.tuna.tsinghua.edu.cn,运行
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx包名
即可
参考
ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)
特别感谢清华大学开源软件镜像站
标签:
相关文章
最新发布
- 【Python系列】SQLAlchemy 基本介绍
- 【Python】selenium 的EC.presence_of_element_located 和 EC.element_to_be_clickable 的区别
- 从零到一!超详细Pycharm安装教程(图解+详细步骤)
- python json jsonl 的用法
- 【Python篇】深度探索NumPy(下篇):从科学计算到机器学习的高效实战技巧
- boto3:Python连接S3对象存储并进行文件操作(上传、下载、删除)
- 全网最适合入门的面向对象编程教程:50 Python函数方法与接口-接口和抽象基类
- Python pycryptodome类库使用学习总结
- import torch 报错:WinError 126
- 如何在Java中实现邮件发送功能?
点击排行
- 版本匹配指南:Numpy版本和Python版本的对应关系
- Python 可视化 web 神器:streamlit、Gradio、dash、nicegui;低代码 Python Web 框架:PyWebIO
- 版本匹配指南:PyTorch版本、torchvision 版本和Python版本的对应关系
- 相关性分析——Pearson相关系数+热力图(附data和Python完整代码)
- Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based proj
- Python pyinstaller打包exe最完整教程
- Anaconda版本和Python版本对应关系(持续更新...)
- Python与PyTorch的版本对应