简体   繁体   English

无法将 tensorflow 与 python 3.8 一起使用

[英]Unable to use tensorflow with python 3.8

I have a CPU only laptop.我有一台只有 CPU 的笔记本电脑。 I'm trying to use tensorflow in python using pycharm.我正在尝试使用 pycharm 在 python 中使用 tensorflow。 I installed Python 3.8 (64 bit) and installed tensorflow successfully using pip .我安装了 Python 3.8(64 位)并使用 pip 成功安装了pip However, when i try to import tensorflow into python, it gives me the attached error.但是,当我尝试将 tensorflow 导入 python 时,它给了我附加的错误。 I'm new to python and pycharm.我是 python 和 pycharm 的新手。 I'm running WIndows 10 on my system.我在我的系统上运行 WIndows 10 。 The error I get is:我得到的错误是:

ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found. ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 找不到指定的模块。

You need to download Visual Studio 2015-2019 x86 and x64 from here: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads您需要从此处下载 Visual Studio 2015-2019 x86 和 x64: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

Then restart your python script and it should work.然后重新启动您的 python 脚本,它应该可以工作。

Source: https://github.com/tensorflow/tensorflow/issues/35749来源: https://github.com/tensorflow/tensorflow/issues/35749

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM