pip install 使用豆瓣镜像源加速安装过程

    xiaoxiao2021-03-25  136

    由于 pip 默认使用的是官方的源,国内下载速度极慢。只需将默认源改为 douban,就可以让下载速度飞起来。方法如下:

    将文件Python或Anaconda安装路径\Lib\site-packages\pip\_internal\models\index.py中的 PyPI = PackageIndex( 'https://pypi.org/', file_storage_domain='files.pythonhosted.org' )

    改为

    PyPI = PackageIndex( 'https://pypi.douban.com/', file_storage_domain='files.pythonhosted.org' )

    即可。

    转载请注明原文地址: https://ju.6miu.com/read-16343.html

    最新回复(0)