SyntaxError when using cx_freeze on PyQt app

喜你入骨 提交于 2019-12-04 10:56:46

Problem lies in fact that cx_freeze tries to use uic submodule for Python 2, not 3 and encounters Py3-incompatible syntax in one of files. Solution is quite simple:

Find uic directory, it should be located in your_python_dir\Lib\site-packages\PyQt4\uic. There are two directories there: port_v2 and port_v3. Rename the first one, for example to port_v2_. I think similar problem can occur while using Python2-rename v3 then. Anyway, this will cause cx_freeze to find proper version of uic and the script should build correctly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!