- 使用 pip 下载,速度较快:
tensorflow-gpu:pip install tensorflow-gpu -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
keras:pip install keras -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
- 执行
import tensorflow/keras
出现问题:Failed to load the native TensorFlow runtime
- 不卸载,继续使用 conda 继续安装 tensorflow:
conda install tensorflow
注:查看packages:conda list
、还原默认源:conda config --remove-key channels
为 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/pkgs/main
conda config --set show_channel_urls yes
- 执行
import tensorflow
出现新问题:UserWarning: h5py is runn
tensorflow、keras安装过程记录
最新推荐文章于 2024-07-28 13:47:26 发布
本文记录了使用pip和conda安装TensorFlow-GPU及Keras的过程,包括遇到的问题及解决方法,如安装速度慢、conda安装时的问题等,通过调整源和执行特定命令来成功安装。
摘要由CSDN通过智能技术生成