解决ImportError: Could not find the DLL(s) ‘msvcp140_1.dll‘问题
刚安装好tensorflow安装包去试试import tensorflow as ft时,出现错误。
错误原因:
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.
解决办法:
1、打开这个网站
https://support.microsoft.com/zh-cn/help/2977003/the-latest-supported-visual-c-downloads
(安装的时候记得看Python版本,如果是64位的,下载visual studio 2015/2017和2019一定要选择64位的。)
2、在这里下载vc_redist64.exe文件。
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200812162707544.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQyMjM5Njg1,size_16,color_FFFFFF,t_70#pic_center)
3、下载后双击安装,然后重启就行了。再次运行import tensorflow as tf就不会报错了。