Files
kman/makepkg.md
2020-06-26 11:26:19 +08:00

32 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 打包问题
1. 'ValueError: too many values to unpack (expected 2)
A: [资源文件打包配置](https://blog.csdn.net/weixin_42052836/article/details/82315118)
资源文件包括打包的python项目使用的相关文件如图标文件文本文件等。对于此类资源文件的打包需要设置Analysis的datas如例子所示datas接收元组datas=[(SETUP_DIR+'lib\\icon','lib\\icon'),(SETUP_DIR+'data','data')]。元组的组成为(原项目中资源文件路径,打包后路径),例子中的(SETUP_DIR+'lib\\icon','lib\\icon')表示从D:\\install_test\\FASTPLOT\\lib\\icon下的图标文件打包后放入打包结果路径下的lib\\icon目录。
1. (kmanenv) [gavin@gavin-2 tkman]$open Release/kmanapp.app/
FAIL - LSOpenURLsWithRole() failed with error -10810 for the file /Users/mark/penv/tkman/Release/kmanapp.app.
(kmanenv) [gavin@gavin-2 tkman]$Release/kmanapp.app/Contents/MacOS/kmanapp
OK
A:
1. 到其他路径区执行(kmanenv) [gavin@gavin-2 penv]$py kman/kmanapp.py看有没有问题
2. 所有路径合并,不用+, 用os.path.join()
3.
1. (kmanenv) [gavin@gavin-2 tkman]$pyinstaller --distpath Release -w -c -i kmanapp.ico kmanapp.spec
21750 ERROR: Can not find path ./libshiboken2.abi3.5.15.dylib (needed by /Users/mark/.virtualenvs/kmanenv/lib/python3.7/site-packages/PySide2/QtGui.abi3.so)
A: rm -fr __pycache__, 重新打包
1. (kmanenv) [gavin@gavin-2 kman]$Release/kmanapp.app/Contents/MacOS/kmanapp
NameError: name 'kMan' is not defined
A: pathex=['/Users/mark/penv/kman',]
# reference
1. [ModuleNotFoundError: No module named 'pkg_resources.py2_warn' ](https://blog.csdn.net/qq_40608730/article/details/104864943)
https://www.cnblogs.com/yemeng/p/6253097.html
https://blog.csdn.net/SCDS_Zyx/article/details/82052396