对于window10安装tensorflow,tensorflow官网已经有比较好的教程
网址为:https://tensorflow.google.cn/install/install_windows
下面我主要来说下我在安装的过程中遇到的问题
1、使用pip安装过程中,pip安装过慢导致超时
此时需要换源
详细请看:https://blog.csdn.net/darkfour/article/details/78191979
2、使用pip安装成功后,执行程序报错
ImportError: Could not find 'cudart64_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-toolkit
说明未安装cuda9.0,去官网https://developer.nvidia.com/cuda-toolkit下载安装即可
3、安装cuda9.0之后,执行程序报错
ImportError: Could not find 'cudnn64_7.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Note that installing cuDNN is a separate step from installing CUDA, and this DLL is often found in a different directory from the CUDA DLLs. You may install the necessary DLL by downloading cuDNN 7 from this URL: https://developer.nvidia.com/cudnn
说明未安装cudnn7,去官网https://developer.nvidia.com/cudnn下载安装即可
由于官网已经不支持下载cudnn7,如果需要可以在
这里https://download.csdn.net/download/qq_31589695/10309840进行下载
下载cudnn7之后,还需要进行如下操作即可
将cudnn7中的相应文件夹中的文件拷贝到cuda9.0对应的文件夹中
即将下面红色框中文件夹中的文件
拷贝到下面红色框中的文件夹中
将问题依次解决之后,程序正常运行