当前位置:   article > 正文

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

could not find a version that satisfies the requirement numpy (from versions

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

pip install -U numpy -i http://mirrors.aliyun.com/pypi/simple

出现警告The repository located at mirrors.aliyun.com 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 http://mirrors.aliyun.com/pypi/simple
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/747230
推荐阅读
相关标签
  

闽ICP备14008679号