运行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