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

运行TensorFlow代码报错ImportError: Could not find the DLL(s) 'msvcp140_1.dll'

3.报错原因:

msvcp140_1.dll 配置文件缺失

4.解决方法:

到网站https://support.microsoft.com/zh-cn/help/2977003/the-latest-supported-visual-c-downloads下载相应计算机文件,点击安装即可:

运行TensorFlow代码报错ImportError: Could not find the DLL(s) 'msvcp140_1.dll'

安装完成后,如图

运行TensorFlow代码报错ImportError: Could not find the DLL(s) 'msvcp140_1.dll'

说是要重启计算机,但是不重启也行,再次运行代码不报错了。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-10-26
  • 2021-04-06
  • 2021-12-24
  • 2021-10-28
猜你喜欢
  • 2021-12-30
  • 2021-07-02
  • 2021-09-23
  • 2022-12-23
  • 2021-05-03
  • 2022-12-23
相关资源
相似解决方案