I switched from a 32 bit version of python to a 64 bit version because 32 bit doesn't support tensorflow.
(我从32位版本的python切换到64位版本,因为32位不支持tensorflow。)
The problem:
(问题:)
My script wouldn't run in my 3.6 python environment because i get the following message:
(我的脚本无法在我的3.6 python环境中运行,因为我收到以下消息:)
Traceback (most recent call last):
(追溯(最近一次通话):)
File "", line 1, in runfile('C:/Users/Gebruiker/Documents/SC2 AI/SCAI deeplearning.py', wdir='C:/Users/Gebruiker/Documents/SC2 AI')
(运行文件中的文件“”,第1行('C:/ Users / Gebruiker / Documents / SC2 AI / SCAI deeplearning.py',wdir ='C:/ Users / Gebruiker / Documents / SC2 AI'))
File "C:\ProgramData\Anaconda3\envs\snakes\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile execfile(filename, namespace)
(运行文件execfile中的文件“ C:\ ProgramData \ Anaconda3 \ envs \ snakes \ lib \ site-packages \ spyder_kernels \ customize \ spydercustomize.py”,行execfile(文件名,名称空间))
File "C:\ProgramData\Anaconda3\envs\snakes\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
(文件“ C:\ ProgramData \ Anaconda3 \ envs \ snakes \ lib \ site-packages \ spyder_kernels \ customize \ spydercustomize.py”,第110行,位于execfile exec(compile(f.read(),filename,'e??xec'),命名空间))
File "C:/Users/Gebruiker/Documents/SC2 AI/SCAI deeplearning.py", line 1, in import keras
(导入keras中的文件“ C:/ Users / Gebruiker / Documents / SC2 AI / SCAI deeplearning.py”,第1行)
File "C:\ProgramData\Anaconda3\envs\snakes\lib\site-packages\keras__init__.py", line 3, in from .
(第3行中的文件“ C:\ ProgramData \ Anaconda3 \ envs \ snakes \ lib \ site-packages \ keras__init __。py”。)
import utils (导入工具)
File "C:\ProgramData\Anaconda3\envs\snakes\lib\site-packages\keras\utils__init__.py", line 2, in from .
(从中输入文件“ C:\ ProgramData \ Anaconda3 \ envs \ snakes \ lib \ site-packages \ keras \ utils__init __。py”。)
import np_utils (导入np_utils)
File "C:\ProgramData\Anaconda3\envs\snakes\lib\site-packages\keras\utils\np_utils.py", line 6, in import numpy as np
(文件“ C:\ ProgramData \ Anaconda3 \ envs \ snakes \ lib \ site-packages \ keras \ utils \ np_utils.py”,第6行,在导入numpy中作为np)
File "C:\Users\Gebruiker\AppData\Roaming\Python\Python36\site-packages\numpy__init__.py", line 140, in from .
(文件“ C:\ Users \ Gebruiker \ AppData \ Roaming \ Python \ Python36 \ site-packages \ numpy__init __。py”,来自。)
import _distributor_init (导入_distributor_init)
File "C:\Users\Gebruiker\AppData\Roaming\Python\Python36\site-packages\numpy_distributor_init.py", line 26, in WinDLL(os.path.abspath(filename))
(WinDLL中的文件“ C:\ Users \ Gebruiker \ AppData \ Roaming \ Python \ Python36 \ site-packages \ numpy_distributor_init.py”(第26行)(os.path.abspath(filename)))
File "C:\ProgramData\Anaconda3\envs\snakes\lib\ctypes__init__.py", line 348, in init self._handle = _dlopen(self._name, mode)
(初始化 self._handle = _dlopen(self._name,mode)中的文件“ C:\ ProgramData \ Anaconda3 \ envs \ snakes \ lib \ ctypes__init __。py”,第348行。)
OSError: [WinError 193] %1 is geen geldige Win32-toepassing
(OSError:[WinError 193]%1是geldige Win32-toepassing)
The error is in dutch and means: [winerror 193] 1 is not a valid win32 application.
(该错误在荷兰语中表示:[winerror 193] 1不是有效的win32应用程序。)
The strange thing is that the exact same script will run in python 3.7 but unfortunately some of the essential features of this script are not supported by python 3.7.... (奇怪的是,完全相同的脚本将在python 3.7中运行,但是不幸的是python 3.7不支持此脚本的某些基本功能。)
Of course I have already searched on the forum but I can't seem to find a solution to this specific problem.
(当然,我已经在论坛上进行了搜索,但似乎找不到针对此特定问题的解决方案。)
Question
(题)
Can someone help me out and explain what I can do so that my script runs on a 3.6 version of python and 64 bits?
(有人可以帮我解释一下我可以做什么,以便我的脚本可以在3.6版本的python和64位代码上运行吗?)
ask by Bart translate from so