我遇到了这个问题,我搜索了很多,但找不到任何解决方案。
我想用pyinstaller构建一个可执行文件。我从来没有遇到过这个问题。
现在我得到了这个追溯:
9677 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
10200 WARNING: lib not found: MSVCP90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\_controls_.pyd
10246 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\_controls_.pyd
10309 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\win32\win32evtlog.pyd
10371 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\win32\win32wnet.pyd
10637 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\_grid.pyd
10964 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\_windows_.pyd
11042 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\DLLs\_hashlib.pyd
11105 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\DLLs\bz2.pyd
11198 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\DLLs\_ssl.pyd
11651 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\_core_.pyd
11915 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\_misc_.pyd
12009 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\DLLs\_ctypes.pyd
12290 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\_gdi_.pyd
12336 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\DLLs\pyexpat.pyd
12461 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\win32\win32api.pyd
12539 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\DLLs\_sqlite3.pyd
12602 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\DLLs\_socket.pyd
12696 WARNING: lib not found: MSVCR90.dll dependency of C:\Windows\system32\pywintypes27.dll
15207 WARNING: lib not found: MSVCP90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\wxmsw30u_core_vc90.dll
15239 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\wxmsw30u_core_vc90.dll
15846 WARNING: lib not found: MSVCP90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\wxmsw30u_adv_vc90.dll
15894 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\wxmsw30u_adv_vc90.dll
16065 WARNING: lib not found: MSVCP90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\wxbase30u_vc90.dll
16112 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\wxbase30u_vc90.dll
16627 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\wxmsw30u_html_vc90.dll
16658 WARNING: lib not found: MSVCP90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\wxmsw30u_html_vc90.dll
16815 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\lib\site-packages\wx-3.0-msw\wx\wxbase30u_net_vc90.dll
16845 INFO: Using Python library C:\Windows\system32\python27.dll
Traceback (most recent call last):
File "C:\Python27\Scripts\pyinstaller-script.py", line 9, in <module>
load_entry_point('PyInstaller==2.1', 'console_scripts', 'pyinstaller')()
File "C:\Python27\lib\site-packages\PyInstaller\main.py", line 88, in run
run_build(opts, spec_file, pyi_config)
File "C:\Python27\lib\site-packages\PyInstaller\main.py", line 46, in run_build
PyInstaller.build.main(pyi_config, spec_file, **opts.__dict__)
File "C:\Python27\lib\site-packages\PyInstaller\build.py", line 1924, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Python27\lib\site-packages\PyInstaller\build.py", line 1873, in build
execfile(spec)
File "build_exportmanager.spec", line 5, in <module>
hookspath=None)
File "C:\Python27\lib\site-packages\PyInstaller\build.py", line 446, in __init__
self.__postinit__()
File "C:\Python27\lib\site-packages\PyInstaller\build.py", line 309, in __postinit__
self.assemble()
File "C:\Python27\lib\site-packages\PyInstaller\build.py", line 700, in assemble
for ln in importTracker.getwarnings():
File "C:\Python27\lib\site-packages\PyInstaller\depend\imptracker.py", line 381, in getwarnings
for w in mod.warnings:
TypeError: iteration over non-sequence
这是我的* .spec:
# -*- mode: python -*-
a = Analysis(['gui.py'],
pathex=['C:\dev_projects\ExportManagerNG\trunk\src', 'C:\dev_projects\common'],
hiddenimports=[],
hookspath=None)
for d in a.datas:
if 'pyconfig' in d[0]:
a.datas.remove(d)
break
#a.binaries = a.binaries - TOC([
# ('tcl85.dll', '', ''),
# ('tk85.dll', '', ''),
# ('_tkinter', '', '')])
#a.datas = [x for x in a.datas if not os.path.dirname(x[1]).startswith("C:\\Python27\\tcl")]
#a.datas = [x for x in a.datas if not os.path.dirname(x[1]).startswith("C:\\Python27\\tk")]
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name=os.path.join('../bin', 'exportmanager.exe'),
debug=False,
strip=None,
upx=True,
console=False )
我在Ubuntu上编码 - 只在虚拟Win 7中构建可执行文件!
答案 0 :(得分:0)
这是一个特定的版本错误,我从开发早午餐修复它:
git clone https://github.com/pyinstaller/pyinstaller.git
cd pyinstaller/
sudo python setup.py install