栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

使用pip出现报错:Could not find a version that satisfies the...No matching distribution distributio...

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

使用pip出现报错:Could not find a version that satisfies the...No matching distribution distributio...

报错解决方法:
警告Ignoring invalid distribution -ip…,一般来说源都换成国内的了,pip版本也更新过了,还提示这两条错误信息:

ERROR: Could not find a version that satisfies the requirement *****(from versions: none)
ERROR: No matching distribution found for *****
试试下面个:
pip install 模块 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

Windows的pip配置文件位置在:

C:Users用户名pippip.ini

更改源可以直接改这个文件或者用以下命令:

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple  #更改源
这是参考清华开源软件镜像站的pypi 镜像使用帮助的,原文是:
https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
如果要临时使用某个源,要在后面加上参数-i:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

pip卸载重装:

卸载PIP的命令:python -m pip uninstall pip
重装PIP的命令:easy_inatall pip
升级PIP的命令:python -m pip install --upgrade pip
参考博客园 https://www.cnblogs.com/burz/p/9099281.html
当然如果报错也没办法使用pip命令升级。

pip的环境变量一般在安装python时就自动设置好了,也是在path下,目标在python安装目录的scripts下。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/529555.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号