using py2exe with wxPython and Matplotlib

前端 未结 4 757
你的背包
你的背包 2021-02-04 14:22

I\'m trying to generate an .exe file from a python script that uses wxPython and Matplotlib and it looks like to be impossible.

The imports I\'m doing (related with Matp

4条回答
  •  囚心锁ツ
    2021-02-04 14:52

    For a simply test, you could simply copy 'mpl-data' folder in 'site-packages\matplotlib' to your app folder. As far as I know, 'mpl-data' cannot be bundled into the single executable so this has to be included in your binary distribution as a folder.

    I used py2exe via GUI2Exe and could freeze my app that uses matplotlib + numpy/scipy + wx (so obviously wxagg backend). I didn't need to include _tkagg (which is explicitly excluded in GUI2Exe default setting which worked for me).

提交回复
热议问题