无法 pip 安装 Tensorflow 'msvcp140_1.dll' 丢失

新手上路,请多包涵

我目前正在尝试 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。任何想法如何解决这一问题?

原文由 Mark Jacobsen 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1.1k
2 个回答
推荐问题