pip安装包速度太慢

pip install jupyterlab -i https://pypi.tuna.tsinghua.edu.cn/simple

我们使用一般步骤在命令行中安装python工具包时,大多是从国外源进行下载,所以导致速度很慢。

解决方法:
在原始安装命令后方加入:“-i https://pypi.tuna.tsinghua.edu.cn/simple”。

如何将国内源设置为默认呢?
如果pip版本在10.0.0以上可以直接设置国内源,否则需要更新pip。
更新pip: python -m pip install --upgrade pip
设置国内源命令行:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

你可能感兴趣的:(pip安装包速度太慢)