Py2exe - Pmw WindowsError: [Error 3]

浪尽此生 提交于 2019-12-10 13:55:28

问题


I am trying to build my standalone executable using Py2exe. I have imported the Pmw class. When I run the stanalone excutable, I get this error:

Traceback (most recent call last):
   File "----.py", line 9, in <module>
   File "zipextimporter.pyc", line 82, in load_module
   File "Pmw\__init__.pyc", line 28, in <module>

WindowsError: [Error 3] The system cannot find the path specified:'C:\\Users\\Administrator\\PycharmProjects\\---\\dist\\-----_pmw.exe\\Pmw/*.*'

I searched this error, but I was not able to find any solution to it Why do i get this traceback error? .


回答1:


Finally, I found the solution:

First, you need to run the bundlepmw.py in the C:\Python27\Lib\site-packages\Pmw\build\lib\Pmw\Pmw_1_3\bin folder following this command: python bundlepmw.py C:\Python27\Lib\site-packages\Pmw\Pmw_1_3\lib to create the Pmw.py.

Read this page: folk.uio.no/hpl/scripting/doc/python/Pmw/dynamicloader.html, after fixing the bundlepmw.py based on this link sourceforge.net/p/pmw/discussion/33675/thread/f0bd7f34. You should be able to generate the Pmw.py file.

Then copy the Pmw.py plus PmwBlt.py and PmwColor.py into the main script directory and run your setup.py. Sweet



来源:https://stackoverflow.com/questions/29370686/py2exe-pmw-windowserror-error-3

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