【求助】MacOS系统下,pyinstaller打包后程序问题

【求助】MacOS系统下,pyinstaller打包后程序问题

打包过程

233 INFO: PyInstaller: 4.0.dev0
234 INFO: Python: 3.8.3
253 INFO: Platform: macOS-10.14.6-x86_64-i386-64bit
257 INFO: wrote /Users/jianghongbing/turtletest1.spec
262 INFO: UPX is not available.
266 INFO: Extending PYTHONPATH with paths
['/Users/jianghongbing/Desktop/1', '/Users/jianghongbing']
270 INFO: checking Analysis
271 INFO: Building Analysis because Analysis-00.toc is non existent
271 INFO: Initializing module dependency graph...
275 INFO: Caching module graph hooks...
290 INFO: Analyzing base_library.zip ...
3905 INFO: Processing pre-find module path hook distutils from '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'.
3906 INFO: distutils: retargeting to non-venv dir '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8'
7436 INFO: Caching module dependency graph...
7593 INFO: running Analysis Analysis-00.toc
7611 INFO: Analyzing /Users/jianghongbing/Desktop/1/turtletest1.py
7788 INFO: Processing module hooks...
7788 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks'...
7790 INFO: Loading module hook 'hook-lib2to3.py' from '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks'...
7833 INFO: Loading module hook 'hook-_tkinter.py' from '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks'...
7839 ERROR: Tcl/Tk improperly installed on this system.
7839 INFO: Loading module hook 'hook-encodings.py' from '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks'...
7935 INFO: Loading module hook 'hook-sysconfig.py' from '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks'...
7951 INFO: Loading module hook 'hook-xml.py' from '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks'...
8012 INFO: Loading module hook 'hook-distutils.py' from '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks'...
8034 INFO: Looking for ctypes DLLs
8076 INFO: Analyzing run-time hooks ...
8081 INFO: Including run-time hook '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks/rthooks/pyi_rth__tkinter.py'
8084 INFO: Including run-time hook '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py'
8096 INFO: Looking for dynamic libraries
8337 INFO: Looking for eggs
8337 INFO: Using Python library /Library/Frameworks/Python.framework/Versions/3.8/Python
8341 INFO: Warnings written to /Users/jianghongbing/build/turtletest1/warn-turtletest1.txt
8379 INFO: Graph cross-reference written to /Users/jianghongbing/build/turtletest1/xref-turtletest1.html
8396 INFO: checking PYZ
8396 INFO: Building PYZ because PYZ-00.toc is non existent
8397 INFO: Building PYZ (ZlibArchive) /Users/jianghongbing/build/turtletest1/PYZ-00.pyz
9006 INFO: Building PYZ (ZlibArchive) /Users/jianghongbing/build/turtletest1/PYZ-00.pyz completed successfully.
9017 INFO: checking PKG
9018 INFO: Building PKG because PKG-00.toc is non existent
9018 INFO: Building PKG (CArchive) PKG-00.pkg
13702 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
13707 INFO: Bootloader /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/bootloader/Darwin-64bit/run
13707 INFO: checking EXE
13707 INFO: Building EXE because EXE-00.toc is non existent
13707 INFO: Building EXE from EXE-00.toc
13707 INFO: Appending archive to EXE /Users/jianghongbing/dist/turtletest1
13760 INFO: Fixing EXE for code signing /Users/jianghongbing/dist/turtletest1
13768 INFO: Building EXE from EXE-00.toc completed successfully.

提示ERROR,但是能顺利完成打包

7839 ERROR: Tcl/Tk improperly installed on this system.

但是打包后的程序,运行后提示如下代码:

[3854] Error loading Python lib '/var/folders/dr/tty_gtpd0rg832rkg4v3g29h0000gn/T/_MEIh0u4n7/Python': dlopen: dlopen(/var/folders/dr/tty_gtpd0rg832rkg4v3g29h0000gn/T/_MEIh0u4n7/Python, 10): no suitable image found.  Did find:
	/var/folders/dr/tty_gtpd0rg832rkg4v3g29h0000gn/T/_MEIh0u4n7/Python: code signature invalid for '/var/folders/dr/tty_gtpd0rg832rkg4v3g29h0000gn/T/_MEIh0u4n7/Python'

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

有没有大神能给个解决办法,已经困扰我好久好久了~

评论 4 您还未登录,请先 登录 后发表或查看评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:1024 设计师:我叫白小胖 返回首页

打赏作者

追风小少年Hogan

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值