[英]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.