我正在尝试使用PyInstaller从以下代码创建一个Windows exe文件:
import rawpy
import imageio
inputdata = r"d:\data\DJI\tmp\tmp2\DJI_0008.DNG"
tifoutfile = r"d:\data\DJI\tmp\tmp2\DJI_0008.tif"
with rawpy.imread(inputdata) as raw:
rgb = raw.postprocess(output_bps=16)
imageio.imwrite(tifoutfile, rgb)
print "file written"
我在windows命令行上使用以下语句:
pyinstaller test2.py
我在创建exe文件时收到错误,但PyInstaller继续:
83444错误:未找到程序集x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
和exe文件在我尝试运行它时发出运行时错误,然后是错误消息:
Traceback (most recent call last):
File "test2.py", line 1, in <module>
File "c:\Python27\ArcGIS10.2\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
exec(bytecode, module.__dict__)
File "site-packages\rawpy\__init__.py", line 5, in <module>
File "c:\Python27\ArcGIS10.2\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 546, in load_module
module = imp.load_module(fullname, fp, filename, ext_tuple)
ImportError: DLL load failed: Nem siker³lt egy dinamikus csatolßs·f³ggvÚnytßr (DLL) inicializßl¾ rutinjßt vÚgrehajtani.
Failed to execute script test2
我知道rawpy库会导致这种情况,但我不知道如何解决它。