我创建了一个使用带有theano后端和其他依赖项的Keras的应用程序,尝试使用cx_freeze进行构建时未显示任何错误。
但是在运行相应的BLU.exe
时会导致控制台错误,
Using Theano backend.
You can find the C code in this temporary file: C:\Users\NIKHIL~1\AppData\Local\Temp\theano_compilation_error_7dp4ezgw
Traceback (most recent call last):
File "D:\Python36-32\lib\site-packages\theano\gof\lazylinker_c.py", line 81, in <module>
actual_version, force_compile, _need_reload))
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Python36-32\lib\site-packages\theano\gof\lazylinker_c.py", line 105, in <module>
actual_version, force_compile, _need_reload))
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Python36-32\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 14, in run
module.run()
File "D:\Python36-32\lib\site-packages\cx_Freeze\initscripts\Console.py", line 26, in run
exec(code, m.__dict__)
File "BLU.pyw", line 26, in <module>
File "CORE\RESPONSE_NET.py", line 1, in <module>
from keras.models import load_model
File "D:\Python36-32\lib\site-packages\keras\__init__.py", line 3, in <module>
from . import utils
File "D:\Python36-32\lib\site-packages\keras\utils\__init__.py", line 6, in <module>
from . import conv_utils
File "D:\Python36-32\lib\site-packages\keras\utils\conv_utils.py", line 9, in <module>
from .. import backend as K
File "D:\Python36-32\lib\site-packages\keras\backend\__init__.py", line 86, in <module>
from .theano_backend import *
File "D:\Python36-32\lib\site-packages\keras\backend\theano_backend.py", line 7, in <module>
import theano
File "D:\Python36-32\lib\site-packages\theano\__init__.py", line 110, in <module>
from theano.compile import (
File "D:\Python36-32\lib\site-packages\theano\compile\__init__.py", line 12, in <module>
from theano.compile.mode import *
File "D:\Python36-32\lib\site-packages\theano\compile\mode.py", line 11, in <module>
import theano.gof.vm
File "D:\Python36-32\lib\site-packages\theano\gof\vm.py", line 674, in <module>
from . import lazylinker_c
File "D:\Python36-32\lib\site-packages\theano\gof\lazylinker_c.py", line 140, in <module>
preargs=args)
File "D:\Python36-32\lib\site-packages\theano\gof\cmodule.py", line 2396, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): C:\Users\Nikhil Nayak\AppData\Local\Theano\compiledir_Windows-10-10.0.15063-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-3.6.8-32\lazylinker_ext\mod.cpp:1:20: fatal error: Python.h: No s. compilation terminated.
任何消除错误的建议或答案将不胜感激!