Win10 Anaconda 安裝tensorflow-gpu遇到的問題以及解決方案

對於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對應的文件夾中

即將下面紅色框中文件夾中的文件


拷貝到下面紅色框中的文件夾中



將問題依次解決之後,程序正常運行


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章