新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

Python中怎么修改pip源

Python中怎么修改pip源,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

创新互联主要从事成都网站设计、成都网站制作、网页设计、企业做网站、公司建网站等业务。立足成都服务梅州,十余年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:13518219792

  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

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注创新互联行业资讯频道,感谢您对创新互联的支持。


名称栏目:Python中怎么修改pip源
URL分享:http://www.wjwzjz.com/article/pgjdpd.html
在线咨询
服务热线
服务热线:028-86922220
TOP