尝试用py2exe
编译Python 2.7脚本,我发现了这个错误:
Traceback (most recent call last):
File "OH_T_1.py", line 28, in <module>
File "GUI_main_1.pyc", line 6, in <module>
File "OH_T_1.pyc", line 29, in <module>
File "export_BD_spatialite_OH_T.pyc", line 13, in <module>
File "pyspatialite\dbapi2.pyc", line 27, in <module>
File "pyspatialite\_spatialite.pyc", line 12, in <module>
File "pyspatialite\_spatialite.pyc", line 10, in __load
ImportError: DLL load failed: La procédure spécifiée est introuvable.
in_load
表示编译器未能找到DLL
但是哪一个?任何帮助/信息都会有所帮助。
PS:此问题与我已发布的问题有关:https://gis.stackexchange.com/questions/73274/problems-with-py2exe-shapely-and-fiona
编辑1
更多信息,我的build.py(即setup.py
)
from distutils.core import setup
import py2exe
import matplotlib
opts = {'py2exe':{"bundle_files":3,
"includes":["matplotlib",
"numpy",
"sip",
"PyQt4.QtCore",
"PyQt4.QtGui",
"osgeo",
"ctypes",
"os",
"sys",
"matplotlib.backends.backend_tkagg",
"pyspatialite"],
"excludes":['_gtkagg', '_tkagg', '_agg2',
'_cairo', '_cocoaagg',
'_fltkagg', '_gtk', '_gtkcairo', ],
'dll_excludes': ['libgdk-win32-2.0-0.dll',
'libgobject-2.0-0.dll',
'mswsock.dll',
'powrprof.dll'],
'packages':["win32api","pyspatialite"]
}
}
setup(name='Application OH_FET',
version='1.0',
windows=["OH_T_1.py"],
data_files=matplotlib.get_py2exe_datafiles(),
options=opts,
zipfile=None
)