pyqt 用py2exe打包出錯的解決辦法
阿新 • • 發佈:2019-02-13
running py2exe
creating D:\data\bitbucket\weixin_project\build
creating D:\data\bitbucket\weixin_project\build\bdist.win32
creating D:\data\bitbucket\weixin_project\build\bdist.win32\winexe
creating D:\data\bitbucket\weixin_project\build\bdist.win32\winexe\collect-2.7
creating D:\data\bitbucket\weixin_project\build\bdist.win32\winexe\bundle-2.7
creating D:\data\bitbucket\weixin_project\build\bdist.win32\winexe\temp
*** searching for required modules ***
error: compiling 'C:\Python27\lib\site-packages\PyQt4\uic\port_v3\proxy_base.py'
failed
creating D:\data\bitbucket\weixin_project\build
creating D:\data\bitbucket\weixin_project\build\bdist.win32
creating D:\data\bitbucket\weixin_project\build\bdist.win32\winexe
creating D:\data\bitbucket\weixin_project\build\bdist.win32\winexe\collect-2.7
creating D:\data\bitbucket\weixin_project\build\bdist.win32\winexe\bundle-2.7
creating D:\data\bitbucket\weixin_project\build\bdist.win32\winexe\temp
*** searching for required modules ***
error: compiling 'C:\Python27\lib\site-packages\PyQt4\uic\port_v3\proxy_base.py'
failed
SyntaxError: invalid syntax (proxy_base.py, line 31)
如上,打包時出錯,可以將上述port_v3的檔案改為port_v3_,然後就能正常運行了。