conda環境下tensorflow、python、numpy以及各種包的快速安裝

tensorflow的配置和版本兼容折磨了好多天,終於成功了。

通用安裝
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 包名==版本號
#tensorflow==1.15.0
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.15.0
#numpy==1.18.2
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy==1.18.2
#python==3.7
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple python==3.7

下載前要看好自己對應的版本兼容情況,有報錯基本上就是版本不兼容的問題

報錯

1.找到對應的兼容版本,對應下載。下載前,要把原來的版本卸載

pip uninstall 名字

conda環境操作命令

查看

conda info --envs

創建

conda create -n env_name python=3.7

激活

activate my_env_name 

退出

deactivate

刪除

conda remove -n my_env_name --all

國內的鏡像地址

清華:https://pypi.tuna.tsinghua.edu.cn/simple
豆瓣:http://pypi.douban.com/simple/
阿里雲:http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
華中理工大學:http://pypi.hustunique.com/
山東理工大學:http://pypi.sdutlinux.org/

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