添加清华源 命令行中直接使用以下命令
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
3642

被折叠的 条评论
为什么被折叠?



