溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Python中怎么修改pip源

發布時間:2021-07-10 17:05:02 來源:億速云 閱讀:144 作者:Leah 欄目:編程語言

Python中怎么修改pip源,很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細講解,有這方面需求的人可以來學習下,希望你能有所收獲。


  1. pip-修改國內鏡像源

  2. Oct 10, 2016 | 16 Hits

  3. mkdir ~/.pip

  4. vim ~/.pip/pip.conf

  5. [global]

  6. index-url = http://mirrors.aliyun.com/pypi/simple/

  7. [install]

  8. trusted-host = mirrors.aliyun.com

  9. 注意事項:


  10. http://mirrors.aliyun.com/pypi/simple/ 中的simple目錄必須有。

  11. –no-cache-dir 重新下載安裝包,而不是使用緩存包。

  12. trusted-host = mirrors.aliyun.com 一定要加上這行,否則會報錯。

  13. pip國內鏡像源


  14. 阿里云 http://mirrors.aliyun.com/pypi/simple/

  15. 中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/

  16. 豆瓣 http://pypi.douban.com/simple

  17. Python官方 https://pypi.python.org/simple/

  18. v2ex http://pypi.v2ex.com/simple/

  19. 中國科學院 http://pypi.mirrors.opencas.cn/simple/

  20. 清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/


  21. 報錯匯總


  22. 報錯內容


  23. pip install mysql-python

  24. Collecting mysql-python

  25.   The repository located at pypi.douban.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 pypi.douban.com'.

  26.   Could not find a version that satisfies the requirement mysql-python (from versions: )

  27. No matching distribution found for mysql-python

  28. 解決辦法


  29. 編輯 vim .pip/pip.conf


  30. [install]

  31. trusted-host = mirrors.aliyun.com

看完上述內容是否對您有幫助呢?如果還想對相關知識有進一步的了解或閱讀更多相關文章,請關注億速云行業資訊頻道,感謝您對億速云的支持。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女