Wxpython python wx/py2exe错误

Wxpython python wx/py2exe错误,wxpython,py2exe,wxwidgets,Wxpython,Py2exe,Wxwidgets,我用python编写了一个工具,其中导入了wxpython库。 然后,我使用py2exe将该工具转换为.exe文件。 一切都按预期工作,可执行文件被创建 当我启动可执行文件时,它崩溃,此消息写入日志: Traceback (most recent call last): File "v2.py", line 1, in <module> File "wx\__init__.pyc", line 45, in <module> File "wx\_core.pyc", li

我用python编写了一个工具,其中导入了wxpython库。 然后,我使用py2exe将该工具转换为.exe文件。 一切都按预期工作,可执行文件被创建

当我启动可执行文件时,它崩溃,此消息写入日志:

Traceback (most recent call last):
File "v2.py", line 1, in <module>
File "wx\__init__.pyc", line 45, in <module>
File "wx\_core.pyc", line 16641, in <module>
AssertionError: wxPython/wxWidgets version mismatch
回溯(最近一次呼叫最后一次):
文件“v2.py”,第1行,在
文件“wx\\ uuuuu init\ uuuuu.pyc”,第45行,在
文件“wx\\ u core.pyc”,第16641行,在
AssertionError:wxPython/wxWidgets版本不匹配
有什么建议吗? 谢谢
AC

解决方案:删除./dist和./build文件夹,然后再次运行py2exe脚本。

请注意,我在windows下的PortableApps python安装中使用了python scripter,并通过easyinstall安装了wxpython。