conda切换为国内源命令

部署运行你感兴趣的模型镜像

添加清华源 命令行中直接使用以下命令

conda config --add channels https://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 --set show_channel_urls yes #设置搜索时显示通道地址

keras创建虚拟环境

conda create -n name python=3.6
#例如
conda create -n kr python=3.6
#进入keras 虚拟环境
conda activate kr

Keras CPU版本的安装
1.先安装后端(tensorflow)

pip install tensorflow==2.0 -i https://pypi.doubanio.com/simple

关键点:需指定2.0版本
2.再安装keras

pip install keras -i https://pypi.doubanio.com/simple

关键点:要使用pip安装

Keras GPU版本的安装
1.先安装后端

conda install tensorflow-gpu==2.0.0

关键点:需设置conda国内源如清华源或者中科大源
NVIDIA驱动版本大于410(nvidia-smi)
python版本为(3.5-3.6)
系统必须为64位
PS:如何查看NVIDIA驱动版本
终端执行命令
nvidia-smi
2.再安装keras

pip install keras -i https://pypi.doubanio.com/simple

关键点:仍要使用pip安装

PS:如果创建了keras的虚拟环境的话,打开jupyter notebook之前还需要在终端输入
conda install nb_conda
然后在输入
jupyter noteboook

您可能感兴趣的与本文相关的镜像

Python3.8

Python3.8

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值