导入TensorFlow Python3.6.10 32位时接收到错误

问题描述

我正在使用anaconda,因为我想在32位系统上使用install tensorflow。我创建了一个新环境以在anaconda中安装tensroflow。 Python = 3.6.10 我收到了这样的错误

runfile('C:/Users/sysksp/.spyder-py3/temp.py',wdir='C:/Users/sysksp/.spyder-py3')
Traceback (most recent call last):

  File "D:\anaconda\envs\python3610\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",line 58,in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *

  File "D:\anaconda\envs\python3610\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",line 28,in <module>
    _pywrap_tensorflow_internal = swig_import_helper()

  File "D:\anaconda\envs\python3610\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",line 24,in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal',fp,pathname,description)

  File "D:\anaconda\envs\python3610\lib\imp.py",line 243,in load_module
    return load_dynamic(name,filename,file)

  File "D:\anaconda\envs\python3610\lib\imp.py",line 343,in load_dynamic
    return _load(spec)

ImportError: DLL load Failed: %1 is not a valid Win32 application.


During handling of the above exception,another exception occurred:

Traceback (most recent call last):

  File "C:\Users\sysksp\.spyder-py3\temp.py",line 6,in <module>
    import tflearn

  File "D:\anaconda\envs\python3610\lib\site-packages\tflearn\__init__.py",line 4,in <module>
    from . import config

  File "D:\anaconda\envs\python3610\lib\site-packages\tflearn\config.py",line 3,in <module>
    import tensorflow as tf

  File "D:\anaconda\envs\python3610\lib\site-packages\tensorflow\__init__.py",line 22,in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import

  File "D:\anaconda\envs\python3610\lib\site-packages\tensorflow\python\__init__.py",line 49,in <module>
    from tensorflow.python import pywrap_tensorflow

  File "D:\anaconda\envs\python3610\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",line 74,in <module>
    raise ImportError(msg)

ImportError: Traceback (most recent call last):
  File "D:\anaconda\envs\python3610\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "D:\anaconda\envs\python3610\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "D:\anaconda\envs\python3610\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py",description)
  File "D:\anaconda\envs\python3610\lib\imp.py",file)
  File "D:\anaconda\envs\python3610\lib\imp.py",in load_dynamic
    return _load(spec)
ImportError: DLL load Failed: %1 is not a valid Win32 application.


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.

`

这是我尝试运行的代码

import nltk
from nltk.stem.lancaster import Lancasterstemmer
stemmer = Lancasterstemmer()

import numpy
import tflearn
import tf
import random
import json

with open("intents.json") as file:
    data = json.load(file)

print(data[""])

是否有解决方案,如果没有,我可以使用任何张量流替代品在32位系统上制作聊天机器人。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)