Failed to execute script pyi_rth_win32comgenpy
See original GitHub issueAfter creating an exe from my Python script, I am getting the following error when attempting to run the .exe.
Traceback (most recent call last): File "site-packages\PyInstaller\loader\rthooks\pyi_rth_win32comgenpy.py", line 47, in <module> File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 395, in load_module exec(bytecode, module.__dict__) File "site-packages\win32com\__init__.py", line 5, in <module> ImportError: No module named win32api [27000] Failed to execute script pyi_rth_win32comgenpy
Pywin32 was installed from the binary installed (after previously installing it from pip). I haven’t found a workaround for this. The exe’s were previously running but it kept throwing an error about a missing win32com module in the console window when auto-py-to-exe ran so I installed pywin32. Now I am getting the above error. Reverting the pywin32 installed does not have any effect.
Python 2.7
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top GitHub Comments
Many thanks for your help - at the end, what make it works was to open conda shell in admin mode, and run auto-py-to-exe from this window - and it worked
@davidsandbar are you sure the python installation / venv you are using to run auto-py-to-exe is the same installation / venv you have pywin32 etc installed in?