mac python3打包成窗体程序_python3代码打包成mac的程序,没办法运行,各位大神请指导一下...
該樓層疑似違規已被系統折疊?隱藏此樓查看此樓
python3代碼打包成mac的程序,沒辦法運行,打包的時候沒有出錯,請高手知道的說一下,我是一個小白,
這是出錯的提示:
Last login: Sat Nov 23 10:09:36 on ttys004
zhanghong@192 ~ % /Users/zhanghong/PycharmProjects/untitled1/dist/b ; exit;
Traceback (most recent call last):
File "PyInstaller/loader/rthooks/pyi_rth__tkinter.py", line 28, in
FileNotFoundError: Tcl data directory "/var/folders/4p/xy0j475966zb4ns90f6mfq2c0000gn/T/_MEIGnK4AM/tcl" not found.
[1947] Failed to execute script pyi_rth__tkinter
[進程已完成]
我的代碼很簡單,代碼是:
import tkinter
top = tkinter.Tk()
# 進入消息循環
top.mainloop()
代碼打包的過程,如下:
(venv) zhanghong@192 untitled1 % pyinstaller -F b.py
71 INFO: PyInstaller: 3.5
71 INFO: Python: 3.7.2
83 INFO: Platform: Darwin-19.0.0-x86_64-i386-64bit
85 INFO: wrote /Users/zhanghong/PycharmProjects/untitled1/b.spec
88 INFO: UPX is not available.
90 INFO: Extending PYTHONPATH with paths
['/Users/zhanghong/PycharmProjects/untitled1',
'/Users/zhanghong/PycharmProjects/untitled1']
90 INFO: checking Analysis
91 INFO: Building Analysis because Analysis-00.toc is non existent
91 INFO: Initializing module dependency graph...
93 INFO: Initializing module graph hooks...
94 INFO: Analyzing base_library.zip ...
4349 INFO: running Analysis Analysis-00.toc
4361 INFO: Caching module hooks...
4368 INFO: Analyzing /Users/zhanghong/PycharmProjects/untitled1/b.py
4540 INFO: Loading module hooks...
4540 INFO: Loading module hook "hook-_tkinter.py"...
4543 ERROR: Tcl/Tk improperly installed on this system.
4544 INFO: Loading module hook "hook-encodings.py"...
4626 INFO: Loading module hook "hook-xml.py"...
4967 INFO: Loading module hook "hook-pydoc.py"...
4991 INFO: Looking for ctypes DLLs
4992 INFO: Analyzing run-time hooks ...
4996 INFO: Including run-time hook 'pyi_rth__tkinter.py'
5003 INFO: Looking for dynamic libraries
5136 INFO: Looking for eggs
5136 INFO: Using Python library /Library/Frameworks/Python.framework/Versions/3.7/Python
5140 INFO: Warnings written to /Users/zhanghong/PycharmProjects/untitled1/build/b/warn-b.txt
5188 INFO: Graph cross-reference written to /Users/zhanghong/PycharmProjects/untitled1/build/b/xref-b.html
5206 INFO: checking PYZ
5206 INFO: Building PYZ because PYZ-00.toc is non existent
5206 INFO: Building PYZ (ZlibArchive) /Users/zhanghong/PycharmProjects/untitled1/build/b/PYZ-00.pyz
5734 INFO: Building PYZ (ZlibArchive) /Users/zhanghong/PycharmProjects/untitled1/build/b/PYZ-00.pyz completed successfully.
5744 INFO: checking PKG
5744 INFO: Building PKG because PKG-00.toc is non existent
5744 INFO: Building PKG (CArchive) PKG-00.pkg
9131 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
9136 INFO: Bootloader /Users/zhanghong/PycharmProjects/untitled1/venv/lib/python3.7/site-packages/PyInstaller/bootloader/Darwin-64bit/run
9136 INFO: checking EXE
9136 INFO: Building EXE because EXE-00.toc is non existent
9136 INFO: Building EXE from EXE-00.toc
9136 INFO: Appending archive to EXE /Users/zhanghong/PycharmProjects/untitled1/dist/b
9151 INFO: Fixing EXE for code signing /Users/zhanghong/PycharmProjects/untitled1/dist/b
9162 INFO: Building EXE from EXE-00.toc completed successfully.
總結
以上是生活随笔為你收集整理的mac python3打包成窗体程序_python3代码打包成mac的程序,没办法运行,各位大神请指导一下...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 一套mysql_mysql 命令一套
- 下一篇: mysql之触发器详解_学习笔记之MyS