1. 程式人生 > 實用技巧 >Python tensorflow安裝出現的問題

Python tensorflow安裝出現的問題

Python tensorflow安裝出現的問題

錯誤報告:

(base) C:\Users\Administrator.WIN-BE456U10DAB>python
Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type “help”, “copyright”, “credits” or “license” for more information.

import tensorflow as tf
2020-10-10 11:06:07.154413: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found

2020-10-10 11:06:07.162917: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

出現原因不明,本人電腦python版本3.7.6,安裝tensorflow2.3的過程中出現了以上問題。

問題成因:

CUDART64_101.DLL,檔案描述:NVIDIA CUDA執行時,版本10.1.243
與cudart64_101.dll相關的錯誤可能由於幾種不同的原因而出現。例如,錯誤的應用程式,cudart64_101.dll被刪除或放錯位置,被您PC上存在的惡意軟體破壞或損壞的Windows登錄檔。

最常見的錯誤訊息是:

該程式無法啟動,因為您的計算機缺少cudart64_101.dll。嘗試重新安裝該程式以解決此問題。
啟動cudart64_101.dll出現問題。指定的模組無法找到。
載入cudart64_101.dll發生錯誤。指定的模組無法找到。
由於找不到cudart64_101.dll,因此無法繼續執行程式碼。重新安裝該程式可能會解決此問題。
cudart64_101.dll並非旨在在Windows上執行,或者包含錯誤。嘗試使用原始安裝媒體再次安裝程式,或與系統管理員或軟體供應商聯絡以獲取支援。
在大多數情況下,解決方案是將PC上的cudart64_101.dll正確地重新安裝到Windows系統資料夾中。或者,某些程式(尤其是PC遊戲)需要將DLL檔案放置在遊戲/應用程式安裝資料夾中。

解決方法:

1.下載cudart64_101.dll.html(看清楚的錯誤報告是不是這個檔案)
在這裡插入圖片描述
下載官方網址:https://www.dll-files.com/cudart64_101.dll.html

解壓之後
第2步
將檔案放在系統目錄中。
預設情況下,這是

C:\Windows\System (Windows 95/98 / Me),

C:\WINNT\System32 (Windows NT / 2000),或

C:\Windows\System32 (Windows XP,Vista,7、8、8.1、10)。
在Windows的64位版本上,32位DLL檔案的預設資料夾是C:\Windows\SysWOW64\ 和64位dll檔案 的預設資料夾 C:\Windows\System32\ 。
確保覆蓋所有現有檔案(但要備份原始檔案)。
重新啟動計算機。
在這裡插入圖片描述
這時候我就解決啦