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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章