Lesson Learned: PyInstaller and MSYS2

73 views
Skip to first unread message

gpra...@gmail.com

unread,
Dec 13, 2020, 8:41:39 AM12/13/20
to PyInstaller
Background:  I messed up my Python 3.7 environment on Windows 10 and MSYS2 trying to update Gtk3+.  It was a big mistake not to make a backup copy of my environment before doing so.  I could not manage to fix the environment as MSYS2 replaced Python with version 3.8.  I ended up starting with a fresh install of MSYS2 to setup a new environement.  I swore that I saw somewhere that both PyWin32 and pypiwin32 were required for PyInstaller.  I went through a lot of gymnastics to get PyWin32 installed.  I was able to package up my app but ran into errors relating to pywintypes when trying to run the app.  PyWin32 was the problem.

Lesson Learned:  If you are using MSYS2 for your Python environment on Windows, you do not need PyWin32, just pypiwin32.  pypiwin32 automatically gets installed when you install PyInstaller.  Once I yanked out PyWin32, my packaged app would finally run.

Hopefully, this helps someone.

Randy
Reply all
Reply to author
Forward
0 new messages