首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Pyinstaller非法指令4(其他计算机)

Pyinstaller非法指令4(其他计算机)
EN

Stack Overflow用户
提问于 2014-08-11 20:13:20
回答 2查看 997关注 0票数 5

在pyinstaller中遇到了问题。我正在尝试使用PyInstaller发布一个exe/app文件。但是,任何试图打开我的文件的人最终都会得到一个非法的指令4错误。

只有当我试图在我的机器上编译并发送给其他人时,才会发生这种情况。其他使用相同进程和规范文件进行编译的人则不会看到同样的问题。当我打开我自己的文件时,exe和app文件打开时不会出错。

任何和所有的想法,感谢!

系统详细信息:

OSX 10.9.4 (所有机器都在上面)

我的PyInstaller输出:

代码语言:javascript
运行
复制
(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$ 

来自其他终端的产出:

代码语言:javascript
运行
复制
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]
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-01-19 09:56:39

我也遇到了这样的问题,最后我转而使用努伊卡

票数 1
EN

Stack Overflow用户

发布于 2017-07-29 18:17:51

这个问题源于您正在打包的python版本的不兼容性。您可能使用的版本是您在您的系统上通过Homebrew或MacPorts编译的。这可能导致二进制与其他OS机器不完全兼容,因为编译器优化。一个简单的解决方案是下载ActivePython并确保您正在使用它来打包源代码。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25251615

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档