从国内镜像地址安装python库

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_34613450/article/details/87457631

(1)使用python内置的pip安装库:

国内镜像地址:https://pypi.tuna.tsinghua.edu.cn/simple

例如:安装 tensorflow可以使用如下命令

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

这样的话,安装速度飞起

(2)基于anaconda安装库

运行以下命令:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

然后在运行安装库的命令,速度照样飞起

猜你喜欢

转载自blog.csdn.net/weixin_34613450/article/details/87457631