1、卸载原来的版本
pip uninstall tensorflow
2、安装新的版本
pip install --ignore-installed --upgrade tensorflow_gpu==1.14(1.14是版本号)这个时gpu的版本
不带gpu就是cpu的版本。
3、验证是否安装成功
python程序运行时报错:
ImportError: Could not find 'cudart64_100.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 10.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive
解决办法:重新安装CUDA10.0,和 cudnn
具体参考:
(2条消息) win10系统CUDA10.0安装教程(for tensorflow2.0)_师范大学生的博客-CSDN博客_cuda10.0安装
(2条消息) 记录下windows下安装cuda10.0过程_陈陈陈亚萌_的博客-CSDN博客
目前电脑上安装的版本时:python 3.7.1 ,tensorflow 1.14,CUDA 10.0,