简体   繁体   English

ImportError:在Python 3.5上没有名为“ _pywrap_tensorflow_internal”的模块

[英]ImportError: No module named '_pywrap_tensorflow_internal' at python 3.5

I got this error when I was try to import tensorflow at Windows10, python version 3.5 it is cpu verion, and I have MSVCP140.DLL. 当我尝试在Windows10上导入tensorflow时出现此错误,python 3.5版是cpu版本,并且我有MSVCP140.DLL。

I found lots of questions at SO, so I downgraded python to ver 3.5, and I installed MSVCP140.DLL.... What's wrong? 我在SO上发现了很多问题,所以我将python降级到3.5版,然后安装了MSVCP140.DLL。...出了什么问题?

Traceback (most recent call last):
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)])
  File "E:\tensorflow_study\tensorflow\lib\imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
    import _pywrap_tensorflow_internal
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)])
  File "E:\tensorflow_study\tensorflow\lib\imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "E:\tensorflow_study\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
    import _pywrap_tensorflow_internal
ImportError: No module named '_pywrap_tensorflow_internal'


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

edit : I used this commend 编辑:我用这个表彰

pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.6.0-py3-none-any.whl

to install tensorflow. 安装tensorflow。 Is this made this error? 这是这个错误吗?

This is not directly related with CPU or GPU. 这与CPU或GPU没有直接关系。 Have been getting this error every now and then both in tesla GPUs and in mac's CPU. 时不时地在tesla GPU和Mac的CPU中都遇到此错误。 Lately I was using 1.13 version on osx and nothing I tried that is written on it's github or here worked until I updated to new beta version. 最近,我在osx上使用了1.13版本,但我尝试过的所有内容都没有写在github上,或者在我更新到新的beta版本之前,这里没有起作用。 Note that you have to change "keras" to "tensorflow.keras" when importing libraries. 请注意,导入库时必须将“ keras”更改为“ tensorflow.keras”。

pip install tensorflow==2.0.0-beta0 

暂无
暂无

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

相关问题 ImportError:没有名为“ _pywrap_tensorflow_internal”的模块 - ImportError: No module named '_pywrap_tensorflow_internal' 导入错误:Python 3.8 中没有名为“_pywrap_tensorflow_internal”的模块 - ImportError: No module named '_pywrap_tensorflow_internal' with Python 3.8 Tensorflow ImportError:Windows 10上没有名为“_pywrap_tensorflow_internal”的模块 - Tensorflow ImportError: No module named '_pywrap_tensorflow_internal' on Windows 10 如何修复“ImportError:没有名为&#39;_pywrap_tensorflow_internal&#39;的模块” - How to fix “ImportError: No module named '_pywrap_tensorflow_internal'” Tensorflow-没有名为&#39;_pywrap_tensorflow_internal&#39;的模块 - Tensorflow - No module named '_pywrap_tensorflow_internal' tensorflow:没有名为&#39;_pywrap_tensorflow_internal&#39;的模块 - tensorflow :No module named '_pywrap_tensorflow_internal' 没有名为“_pywrap_tensorflow_internal”的模块 - No Module Named '_pywrap_tensorflow_internal' modulenotfounderror 没有名为“_pywrap_tensorflow_internal”的模块 - modulenotfounderror no module named '_pywrap_tensorflow_internal' 没有名为“_pywrap_tensorflow_internal”的模块错误 - No module named '_pywrap_tensorflow_internal' Error tensorflow安装正确,但出现错误``ImportError:在导入tensorflow为tf时没有名为&#39;_pywrap_tensorflow_internal&#39;的模块 - tensorflow installed correctly but giving error "ImportError: No module named '_pywrap_tensorflow_internal' on import tensorflow as tf
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM