Niseonna
Niseonna

Reputation: 181

Create a python 3 exe with pyinstaller with Pmw module

Based on this Previos Post I'm trying to figure out how to make an exe out of my python files. The main issue seems to be that Pmw and its modules do not seem to import correctly though pyinstaller. The main error says:

FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\User\Name\AppData\Local\Temp\_MEI61522\Pmw

Looking at the Pmw init it seems what it's doing is looking for files in the directory which have Pmw_### and looking in there which has lib and then PmwLoader.suffix and loadther then imports all the dependencies

So now it seems pyinstaller isn't understanding this file dependency system created by Pmw and when I tried to follow the previous post instruction I ran into other errors that made the code unable to compile.

If anyone has any insight on this, that would be fantastic

Upvotes: 1

Views: 820

Answers (2)

ehusmark
ehusmark

Reputation: 21

PMW has a script for bundling (almost) everything into one file which I found in Lib\site-packages\Pmw\Pmw_\bin\bundlepmw.py My version wasn't entirely Python 3 compliant so I had to make a few edits to the file before adding it to my sources. Ugly but it worked for me.

Upvotes: 1

Niseonna
Niseonna

Reputation: 181

Welp, I gave up on pyinstaller and downgraded to python 3.4 and used cx_freeze and created created a single Pmw.py file from some code which I found from python-pmw-and-cx-freeze

Upvotes: 0

Related Questions