我该如何解决ValueError:未知的加载命令:pyinstaller OSX中为50

时间:2018-11-09 11:05:23

标签: python python-2.7 pyinstaller

在更新osx之后编译我的所有python代码时遇到问题。 在将高山脉升级到莫哈韦沙漠后的几天后,我才发现它。我不知道这是操作系统问题还是pyinstaller库问题与另一个库冲突。

这是错误消息

pyinstaller --onefile --icon=upload.icns --name=uploader2 apps.py
96 INFO: PyInstaller: 3.2.1
96 INFO: Python: 2.7.10
108 INFO: Platform: Darwin-18.0.0-x86_64-i386-64bit
109 INFO: wrote /Users/applemacbookpro/code/myapps/uploader/uploader2.spec
120 INFO: UPX is not available.
121 INFO: Extending PYTHONPATH with paths
['/Users/applemacbookpro/code/myapps/uploader',
'/Users/applemacbookpro/code/myapps/uploader']
122 INFO: checking Analysis
139 INFO: Building because /Users/applemacbookpro/code/myapps/uploader/apps.py changed
139 INFO: Initializing module dependency graph...
147 INFO: Initializing module graph hooks...
208 INFO: running Analysis out00-Analysis.toc
Traceback (most recent call last):
File "/usr/local/bin/pyinstaller", line 9, in 
load_entry_point('PyInstaller==3.2.1', 'console_scripts', 'pyinstaller')()
File "/Library/Python/2.7/site-packages/PyInstaller/main.py", line 90, in run
run_build(pyi_config, spec_file, **vars(args))
File "/Library/Python/2.7/site-packages/PyInstaller/main.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/Library/Python/2.7/site-packages/PyInstaller/building/build_main.py", line 788, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/Library/Python/2.7/site-packages/PyInstaller/building/build_main.py", line 734, in build
exec(text, spec_namespace)
File "", line 16, in 
File "/Library/Python/2.7/site-packages/PyInstaller/building/build_main.py", line 212, in init
self.postinit()
File "/Library/Python/2.7/site-packages/PyInstaller/building/datastruct.py", line 161, in postinit
self.assemble()
File "/Library/Python/2.7/site-packages/PyInstaller/building/build_main.py", line 373, in assemble
redirects=self.binding_redirects)[1:])
File "/Library/Python/2.7/site-packages/PyInstaller/depend/bindepend.py", line 227, in Dependencies
for lib, npth in selectImports(pth, xtrapath):
File "/Library/Python/2.7/site-packages/PyInstaller/depend/bindepend.py", line 500, in selectImports
dlls = getImports(pth)
File "/Library/Python/2.7/site-packages/PyInstaller/depend/bindepend.py", line 734, in getImports
return _getImports_macholib(pth)
File "/Library/Python/2.7/site-packages/PyInstaller/depend/bindepend.py", line 621, in _getImports_macholib
m = MachO(pth)
File "/Library/Python/2.7/site-packages/PyInstaller/lib/macholib/MachO.py", line 69, in init
self.load(fp)
File "/Library/Python/2.7/site-packages/PyInstaller/lib/macholib/MachO.py", line 79, in load
self.load_fat(fh)
File "/Library/Python/2.7/site-packages/PyInstaller/lib/macholib/MachO.py", line 90, in load_fat
self.load_header(fh, arch.offset, arch.size)
File "/Library/Python/2.7/site-packages/PyInstaller/lib/macholib/MachO.py", line 114, in load_header
hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian)
File "/Library/Python/2.7/site-packages/PyInstaller/lib/macholib/MachO.py", line 154, in init
self.load(fh)
File "/Library/Python/2.7/site-packages/PyInstaller/lib/macholib/MachO.py", line 186, in load
raise ValueError("Unknown load command: %d" % (cmd_load.cmd,))
ValueError: Unknown load command: 50

0 个答案:

没有答案