成功解决:WARNING: The repository located at mirrors .aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this waming and allow it anyway with '-trusted-host mirrors .aliyun.com".
报错问题
粉丝群里面的一个小伙伴想用pip安装第三方模块却发生了报错(当时他心里瞬间凉了一大截,跑来找我求助,然后顺利帮助他解决了,顺便记录一下希望可以帮助到更多遇到这个bug不会解决的小伙伴),报错信息如下:
报错信息如下所示:
WARNING: The repository located at mirrors .aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this waming and allow it anyway with '-trusted-host mirrors .aliyun.com".
报错翻译
报错内容翻译翻译:
警告:存储库位于镜像。阿丽云。com不是受信任或安全的主机,正在被忽略。如果此存储库可通过HTTPS访问,我们建议您改用HTTPS,否则您可能会使此waming静音,并允许使用’-受信任的主机镜像。阿丽云。com”。
报错原因
权限问题报错:
需要设置信任这个镜像网址,才可以下载。
小伙伴按下面的解决方法修改代码即可解决!!!
解决方法
注意:运行pip安装命令需要关闭VPN!!!
在pip命令后面加上--trusted-host mirrors.aliyun.com
,使用下面pip命令安装语句安装即可:
pip install pymssql -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
运行成功:
以上是此问题报错原因的解决方法,欢迎评论区留言讨论是否能解决,如果有用欢迎点赞收藏文章谢谢支持,博主才有动力持续记录遇到的问题!!!