Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.17 KB

package.md

File metadata and controls

48 lines (31 loc) · 1.17 KB

关于打包[ubuntu]

!路径不要有中文
pyinstaller ctpbee_desktop.py #生成 ctpbee_desktop.spec  build  dist

修改 ctpbee_desktop.spec

# ctpbee_desktop.spec

 datas=[("app/static","static"),
        ("venv/lib/python3.7/site-packages/ctpbee-0.31.3-py3.7-linux-x86_64.egg/ctpbee",'ctpbee'),("venv/lib/python3.7/site-packages/PySide2","PySide2")],
 # datas=[("文件或文件夹路径:自行查找","dist下的名称")]
 
 hiddenimports=['PySide2.QtPrintSupport'],
 #可能需要显示导入QtPrintSupport,不过代码中貌似没出现使用的地方

再次打包

pyinstaller ctpbee_desktop.spec  # 注意后缀  .spec

运行

cd dist/ctpbee_desktop 
./ctpbee_desktop

打包时报错 No module named 'win32com'

pip install pypiwin32

如k线图不显示(QWebEngineView)

解决方法

64bit

32bit