鱼C论坛

 找回密码
 立即注册
查看: 971|回复: 2

新手求助

[复制链接]
发表于 2019-4-16 17:08:19 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。

在导入tensorflow的时候,体统提示如上所示错误,但是我的python是3.6.8,64位的,导入numpy没有提示错误。请问怎么解决?
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2019-4-16 17:10:11 | 显示全部楼层
Traceback (most recent call last):
  File "D:\python\pythonInstall\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "D:\python\pythonInstall\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 35, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "D:\python\pythonInstall\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 30, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "D:\python\pythonInstall\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "D:\python\pythonInstall\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:/WQDWJJ/martix_train/.idea/train_1.py", line 3, in <module>
    import tensorflow as tf
  File "D:\python\pythonInstall\lib\site-packages\tensorflow\__init__.py", line 22, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "D:\python\pythonInstall\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "D:\python\pythonInstall\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "D:\python\pythonInstall\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "D:\python\pythonInstall\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 35, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "D:\python\pythonInstall\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 30, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "D:\python\pythonInstall\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "D:\python\pythonInstall\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。


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



这是完整的错误提示,实在是搞不懂。
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-4-16 20:04:21 | 显示全部楼层
把numpy卸载了,再安装tensorflow看下。。
我之前安装tensorflow时,发现numpy的版本不匹配,就没法安装成功。。后来直接卸掉numpy。。只安装TensorFlow就可以了。(tensorflow安装时,会打包安装numpy,所以不必再单独安装numpy)。
个人之前遇到的问题,不知道是否适用你的问题
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-1-15 08:05

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表