300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > Python在使用pip安装某个库时报错 Could not find a version that satisfies the requirement numpy

Python在使用pip安装某个库时报错 Could not find a version that satisfies the requirement numpy

时间:2021-06-01 14:25:31

相关推荐

Python在使用pip安装某个库时报错 Could not find a version that satisfies the requirement numpy

问题描述:Python中在使用pip的下述命令安装第三方库numpy

pip install -U numpy -i /pypi/simple

出现警告The repository located at is not a trusted or secure host and is being ignored,并且报错Could not find a version that satisfies the requirement numpy (from versions: none)

解决方法:出现这个问题的原因是pip升级到7.0以后,pip包管理工具直接从镜像源下载相关的依赖库时,所需要的镜像源必须是HTTPS协议的网络地址,不能直接从非HTTPS协议的镜像源地址下载依赖库。如果想从非HTTPS协议的镜像源地址下载依赖库,在使用pip命令下载依赖库的时候需要添加--trusted-host 域名配置

pip install -U numpy -i /pypi/simple

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。