无法通过pip安装Tensorflow,提示'msvcp140_1.dll'文件丢失。

13

我目前正在尝试pip install tensorflow,这个命令可以正常工作。但是在我安装完成之后,通过import tensorflow as tf将其导入到我的Python模块时,我会遇到以下错误消息:

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

我安装了msvcp140_1.dll并将其放入C:\Users\User\AppData\Local\Programs\Python\Python37,该路径已包含在我的环境变量中。

正如您所看到的,我正在使用Python 3.7,因为Tensorflow不支持3.8。 有什么想法如何解决这个问题吗?


https://github.com/pyinstaller/pyinstaller/issues/4923 - zvi
4个回答

9

9

我刚刚安装了x64版本,重新启动了电脑,但问题仍然存在。有什么想法吗? - Murilo

1

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接