安装django:
pip install django -i https://pypi.douban.com/simple/
报错:
更换方案:
pip install django -i https://pypi.douban.com/simple/ --trusted-host pypi.dou
ban.com```
同样错误
更换方案:
pip install django -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
成功
分析:pip 中为http,而非https
可能影响因素:http和https使用的是完全不同的连接方式,用的端口也不一样,前者是80,后者是443。