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/

猜你喜欢

转载自blog.csdn.net/weixin_45773603/article/details/105243468