(1)使用python内置的pip安装库:
国内镜像地址:https://pypi.tuna.tsinghua.edu.cn/simple
例如:安装 tensorflow可以使用如下命令
pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple(所有的库只要在这里改个tensorflow 名字就行啦,替换成我们要的库名称即可,速度真的超快的)
这样的话,安装速度飞起
(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
然后在运行安装库的命令