Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Py2exe - Pmw WindowsError: [Error 3]

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? .

like image 444
Hamid K Avatar asked Nov 09 '22 16:11

Hamid K


1 Answers

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

like image 62
Hamid K Avatar answered Nov 14 '22 22:11

Hamid K