pyinstaller遇到问题。我正在尝试使用PyInstaller发行exe/app文件。但是,任何尝试打开我的文件的人最终都会收到“非法指令4”错误。
仅当我尝试在计算机上进行编译并发送给其他人时,才会发生这种情况。使用相同进程和规范文件进行编译的其他人则不会看到此相同问题。当我打开自己的文件时,exe和app文件打开时没有错误。
任何和所有想法表示赞赏!
系统详情:
OSX 10.9.4(所有计算机都在此上)
我的PyInstaller输出:
(veControl)ahaq-mbp-10028:asimov-control ahaque$ pyinstaller asimov_gui.spec --onefile
23 WARNING: You are running 64-bit Python: created binaries will only work on Mac OS X 10.6+.
If you need 10.4-10.5 compatibility, run Python as a 32-bit binary with this command:
VERSIONER_PYTHON_PREFER_32_BIT=yes arch -i386 /Users/ahaque/asimov-control/veControl/bin/python
4029 INFO: UPX is not available.
4050 INFO: Processing hook hook-os
4152 INFO: Processing hook hook-time
4154 INFO: Processing hook hook-cPickle
4220 INFO: Processing hook hook-_sre
4330 INFO: Processing hook hook-cStringIO
4424 INFO: Processing hook hook-encodings
4437 INFO: Processing hook hook-codecs
4756 INFO: Extending PYTHONPATH with /users/ahaque/asimov-control
4756 INFO: checking Analysis
4806 INFO: checking PYZ
4825 INFO: checking PKG
4844 INFO: checking EXE
4845 INFO: checking BUNDLE
4845 INFO: building BUNDLE out00-BUNDLE.toc
(veControl)ahaq-mbp-10028:asimov-control ahaque$
来自其他终端的输出:
Last login: Mon Aug 11 13:05:00 on ttys002
LOADER: executable is /Users/dachelis/Downloads/Asimov_GUI 2
LOADER: homepath is /Users/dachelis/Downloads
LOADER: _MEIPASS2 is NULL
LOADER: archivename is /Users/dachelis/Downloads/Asimov_GUI 2
LOADER: Extracting binaries
LOADER: Executing self as child
LOADER: set _MEIPASS2 to /var/folders/q6/nxdsj2_x6x3d32pcjqf2468wwtqnq6/T/_MEIlbLNev
LOADER: executable is /Users/dachelis/Downloads/Asimov_GUI 2
LOADER: homepath is /Users/dachelis/Downloads
LOADER: _MEIPASS2 is /var/folders/q6/nxdsj2_x6x3d32pcjqf2468wwtqnq6/T/_MEIlbLNev
LOADER: archivename is /Users/dachelis/Downloads/Asimov_GUI 2
LOADER: Already in the child - running user's code.
LOADER: Python library: /var/folders/q6/nxdsj2_x6x3d32pcjqf2468wwtqnq6/T/_MEIlbLNev/.Python
LOADER: Manipulating evironment
LOADER: PYTHONPATH=/var/folders/q6/nxdsj2_x6x3d32pcjqf2468wwtqnq6/T/_MEIlbLNev
LOADER: PYTHONHOME=/var/folders/q6/nxdsj2_x6x3d32pcjqf2468wwtqnq6/T/_MEIlbLNev
LOADER: Manipulating Python's sys.path
LOADER: importing modules from CArchive
LOADER: extracted struct
LOADER: extracted pyi_os_path
LOADER: extracted pyi_archive
LOADER: extracted pyi_importers
LOADER: Installing import hooks
LOADER: out00-PYZ.pyz
LOADER: Running scripts
Illegal instruction: 4
logout
[Process completed]
最佳答案
我也遇到了这样的问题,最后我切换为使用nuitka。
关于python - Pyinstaller非法指令4(其他计算机),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25251615/