XGBoost
pip install xgboost -i https://pypi.tuna.tsinghua.edu.cn/simple
Tensorflow
pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow
若报错是版本问题,则用下面代码:
pip uninstall tensorflow
pip install tensorflow==1.15.0 -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
pytorch
先设置镜像源,如清华的conda镜像(可参考[其他博客](https://blog.csdn.net/qq_29007291/article/details/81103603))
conda config --add channelshttps://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
官方安装的命令是官方安装版本(版本1.4 GPU)
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
但要用国内源,但要用国内源,我我发现不能用-c这一段,直接用
conda install pytorch torchvision cudatoolkit=10.1
这是我最终使用的(https://blog.csdn.net/qq_21420941/article/details/100200030)
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
OpenCV
pip install opencv-contrib-python -i https://pypi.mirrors.ustc.edu.cn/simple/
Keras
解决Keras安装超时的问题:
pip install keras -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
豆瓣镜像
-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
网友评论