简体   繁体   English

使用 Pyinstaller 构建无法在 Mac OS Catalina 上运行

[英]building with Pyinstaller not working on Mac OS Catalina

I have had some errors working while with pyinstaller for python 3. I am using Mac OS Catalina.我在使用 pyinstaller for python 3 时遇到了一些错误。我使用的是 Mac OS Catalina。 please help me my issue.请帮我解决我的问题。

print("Hello World")

I'm running the below pyinstaller我正在运行下面的 pyinstaller

pyinstaller --log-level=DEBUG --clean --icon "/Users/projects/hello/build/noun_wooden_wheel_2216564_420.icns" --name hello_world --exclude-module='FixTk' --exclude-module='tcl' --exclude-module='tk' --exclude-module='_tkinter' --exclude-module='tkinter' --exclude-module='Tkinter' --exclude-module='pytest' --onefile -d all --windowed main.py

Here is the error I get after I run the output file这是我运行输出文件后得到的错误

Error loading Python lib '/var/folders/q9/g1d15sw13q5cdspzvpq46mrr0000gn/T/_MEIgYpRBc/Python': dlopen: dlopen(/var/folders/q9/g1d15sw13q5cdspzvpq46mrr0000gn/T/_MEIgYpRBc/Python, 10): no suitable image found.  Did find:
    /var/folders/q9/g1d15sw13q5cdspzvpq46mrr0000gn/T/_MEIgYpRBc/Python: code signature invalid for '/var/folders/q9/g1d15sw13q5cdspzvpq46mrr0000gn/T/_MEIgYpRBc/Python'

    /var/folders/q9/g1d15sw13q5cdspzvpq46mrr0000gn/T/_MEIgYpRBc/Python: stat() failed with errno=3

I'm not even able to run on the machine I built it on.我什至无法在我构建它的机器上运行。

macOS 不理解单文件包,不要使用--onefile标志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 更新到 Mac OS Catalina,Spyder 3 错误 - Updated to Mac OS Catalina, Spyder 3 errors 如何在 Mac OS Catalina zsh shell 上永久设置用户 PATH - How to set user PATH permanently on Mac OS Catalina zsh shell Mac OS Catalina 全新安装的 pip3 和 pipenv 问题 - Problems with pip3 and pipenv with Mac OS Catalina fresh install 创建Onefile应用时如何修复Pyinstaller Mac OS错误 - How to fix Pyinstaller Mac Os error when creating onefile app OS Mojave 中的 tkinter 8.6 系统崩溃错误是否已在 mac OS Catalina 中修复? - Is the tkinter 8.6 system crash bug in OS Mojave fixed in mac OS Catalina? 无法在 Mac OS X Catalina 中找到“/Library/Python/3.7m/include/pyconfig.h”? - Unable to find “/Library/Python/3.7m/include/pyconfig.h” in Mac OS X Catalina? 使用 os.path 和 pathlib Mac OSX Catalina 时的奇怪路径行为 - Weird path behavior when using os.path and pathlib Mac OSX Catalina 在 Mac Catalina 上安装 Opencv - installing Opencv on Mac Catalina 在Mac OS Lion上为Python3构建numpy / scipy - Building numpy/scipy for Python3 on Mac OS Lion ModuleNotFoundError:运行由 PyInstaller 编译的 Mac OS 应用程序时没有名为“cmath”的模块:PyTesseract 出现问题 - ModuleNotFoundError: No module named 'cmath' when running a Mac OS App compiled by PyInstaller : Problem with PyTesseract
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM