在使用python的时候,经常会遇到安装库速度慢的问题,这是因为pip默认使用的是国外源,而国外源的网络状况不太理想,导致安装库的速度变慢。要解决这个问题,可以使用国内的镜像源,比如清华大学的镜像源,这样可以大大提高安装库的速度。
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
pip install -i https://mirrors.aliyun.com/pypi/simple/ some-package
pip install -i https://pypi.mirrors.ustc.edu.cn/simple/ some-package
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir some-package命令可以使用多线程下载,提高下载速度。
pip install --no-cache-dir some-package
本文链接:http://task.lmcjl.com/news/7549.html