conda、pip、source使用方法总结

congda

1. 配置channels

conda config --add channels conda-forge
conda config --add channels defaults
conda config --add channels r
conda config --add channels bioconda
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
#最后一个是换国内的镜像

#查看已经添加的channels
conda config --get channels

2.安装和卸载

比如卸载tensorflow
conda remove tensorflow

conda install tensorflow

conda install tensorflow=='版本号'  # ‘1.8.0’

conda install opencv=='3.4.2'
 

二、pip工具的使用‘

1、安装和卸载

1.1 官方安装方法-适用翻墙
tensorflow安装方法比较常见,参考谷歌的官方教程,安装方法如下:
pip3 install --upgrade tensorflow # for Python 3.
pip3 install --upgrade tensorflow-gpu # for Python 3.and GPU

1.2 使用镜像安装
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow # for Python 3.*
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu # for Python 3.* and GPU

发布了124 篇原创文章 · 获赞 415 · 访问量 55万+

猜你喜欢

转载自blog.csdn.net/m0_37870649/article/details/104480892