简体   繁体   English

导入tensorflow(刚刚安装)python 3.7时出错

[英]Error importing tensorflow (just installed) python 3.7

I have python 3.7 installed on a Windows 10 machine, no custom stuff at all, to install tensorflow I used:我在 Windows 10 机器上安装了 python 3.7,根本没有自定义的东西,来安装我使用的 tensorflow:

pip3 install --user --upgrade tensorflow

but when I try importing it using: import tensorflow in a python script or shell it gives me the following error:但是当我尝试使用以下方法import tensorflow它时: import tensorflow in a python script or shell 它给了我以下错误:

ImportError: DLL load failed: The specified module could not be found.

Am I doing something wrong?难道我做错了什么?

edit: By the way pip version is 20.0.2, I precedently tried with pip 10.x and got the same result.编辑:顺便说一下 pip 版本是 20.0.2,我之前尝试过 pip 10.x 并得到了相同的结果。

Regarding https://github.com/tensorflow/tensorflow/issues/35749 or https://github.com/tensorflow/tensorflow/issues/36859 (and the amount of same duplicate issues) there are some recents problems with tensorflow 2.1 for some windows computers.关于https://github.com/tensorflow/tensorflow/issues/35749https://github.com/tensorflow/tensorflow/issues/36859 (以及相同重复问题的数量),tensorflow 2.1 存在一些最近的问题一些windows电脑。 A fix so far, is to use tensorflow 2.0 on windows :到目前为止的修复是在 windows 上使用 tensorflow 2.0:

pip install tensorflow==2.0

For more details, this is quite detailed : https://github.com/tensorflow/tensorflow/issues/36167#issuecomment-577886156有关更多详细信息,这是非常详细的: https : //github.com/tensorflow/tensorflow/issues/36167#issuecomment-577886156

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

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