与Pyinstaller的Pywintypes错误

时间:2018-03-24 20:08:48

标签: python pyinstaller

我正在尝试使用Pyinstaller将短脚本转换为EXE。我正在运行Windows 10并使用32位python。

我收到此错误:

pywintypes.error: (2, 'LoadLibraryEx', 'The system cannot find the file     specified.')

脚本是:

#text->PNG->STL
from pylab import imread
from scipy.ndimage import gaussian_filter
from stl_tools import numpy2stl, text2png

print "enter name"
patientName = raw_input()

text = (patientName)
# save png
text2png(text, 'Tempfile', fontsize=90)
# read from rendered png
A = 256 * imread("Tempfile.png")
A = A.mean(axis=2)  # grayscale projection
A = gaussian_filter(A.max() - A, 1.0)
#changed scale from .15
numpy2stl(A, "DAVE111.stl", scale=0.85, mask_val=5, max_width=14)
print "done"

使用Pyinstaller时我收到的错误(我也尝试过cx_freeze和py2exe)很长,但结尾于:

 File "c:\python27\lib\site-packages\PyInstaller\utils\win32\winresource.py", line 168, in GetResources
    hsrc = win32api.LoadLibraryEx(filename, 0, LOAD_LIBRARY_AS_DATAFILE)
pywintypes.error: (2, 'LoadLibraryEx', 'The system cannot find the file specified.')

我一直在修补Spec文件并尝试一切,似乎无法弄明白。任何帮助,将不胜感激!我也试过没有运气重新下载win32api。

谢谢,

戴夫

0 个答案:

没有答案