運行TensorFlow代碼報錯ImportError: Could not find the DLL(s) 'msvcp140_1.dll'


1.代碼報錯環境:

Windows 10 + Python 3.7

2.整體代碼:

        ImportError: Could not find the DLL(s) 'msvcp140_1.dll'. TensorFlow requires that these DLLs be installed in a directory that is named in your %PATH% environment variable. You may install these DLLs by downloading "Microsoft C++ Redistributable for Visual Studio 2015, 2017 and 2019" for your platform from this URL: https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads

3.報錯原因:

msvcp140_1.dll 配置文件缺失

4.解決方法:

到網站https://support.microsoft.com/zh-cn/help/2977003/the-latest-supported-visual-c-downloads下載相應計算機文件,點擊安裝即可:

安裝完成后,如圖

說是要重啟計算機,但是不重啟也行,再次運行代碼不報錯了。

轉載於:https://blog.csdn.net/qq_36853469/article/details/105864905


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM