1. 程式人生 > >pip源提示“not a trusted or secure host” 解決

pip源提示“not a trusted or secure host” 解決

cat 就是 anyway with 。。 AR -h ins recommend

今天pip出現了一個莫名其妙的問題

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 it is recommended to use HTTPS instead, 
otherwise you may silence this warning and allow it anyways with ‘--trusted-host mirrors.aliyun.com‘.

這段的意思是現在已經采用了HTTPS源,否則直接報錯。

解決辦法:
pip.conf 加上

trusted-host = mirrors.aliyun.com

也就是說,你的pip.conf文件的最終形態:

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com

這樣就可以了。。

pip源提示“not a trusted or secure host” 解決