國內鏡像網站
- 鏡像站名 網址
- 阿里云開源鏡像站 http://mirrors.aliyun.com/
- 網易開源鏡像站 http://mirrors.163.com/
- 搜狐開源鏡像 http://mirrors.sohu.com/
- 浙江大學開源鏡像站 http://mirrors.zju.edu.cn/
- 清華大學開源軟體鏡像站 https://mirrors.tuna.tsinghua.edu.cn/
- 中國科學技術大學 http://mirrors.ustc.edu.cn/
- 騰訊開源鏡像站 http://mirrors.cloud.tencent.com/pypi/simple
- 豆瓣開源鏡像站 http://pypi.douban.com/simple
1)隨便進入一個鏡像站:進入官網->往下滑->點擊Mirrors 幫助底下的配置軟體源
2)左上角搜索框輸入Pypi,然后點擊右邊框的Pypi鏡像源使用幫助
3)此時該頁面就用永久配置和臨時配置的方法
4)當你輸入完命令的時候命令列會提示你檔案保存在哪里,我的檔案被自動保存在
5)此時當你使用pip命令安裝的時候,還是會報一個警告,警告為WARNING: The repository located at mirrors.cloud.tencent.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.cloud.tencent.com'.
設定信任網站
1)編輯剛才的pip檔案,我的pip檔案被自動保存在C:\Users\dayuanshuai\AppData\Roaming\pip\pip.ini,在最低行添加trusted-host = mirrors.cloud.tencent.com,此時該檔案內容為:
|
[global] |
如果你使用的是阿里pypi源,那你就把trusted-host設定為trusted-host = mirrors.aliyun.com
著作權宣告:本文為CSDN博主「IDYS ? 元帥」的原創文章,遵循CC 4.0 BY-SA著作權協議,轉載請附上原文出處鏈接及本宣告,
原文鏈接:https://blog.csdn.net/weixin_41633902/article/details/115754289
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/544085.html
標籤:Python
上一篇:python爬蟲學習——元組,字典(2.14日博客補)
下一篇:Python多任務教程
