项目场景:
在anaconda prompt中使用阿里云镜像时发出了警告
问题描述
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 warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.
翻译警告:存储库位于镜像。阿丽云。com不是受信任或安全的主机,正在被忽略。如果此存储库可通过HTTPS访问,我们建议您改用HTTPS,否则您可能会使此waming静音,并允许使用’-受信任的主机镜像。阿丽云。com”。
原因分析:
权限问题报错:
需要设置信任这个镜像网址,才可以下载。
解决方案:
在pip
命令后面加上--trusted-host mirrors.aliyun.com
,使用下面pip命令安装语句安装即可:
pip install pymssql -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
运行成功全流程为
希望能对大家有帮助。