[GH-ISSUE #210] ImportError #190

Closed
opened 2026-02-26 12:20:46 +03:00 by kerem · 3 comments
Owner

Originally created by @madtatu-development on GitHub (Nov 4, 2021).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/210

Background:

after I couldnt create the EXE after updating to Python 3.10,0, I had decided to go back to 3.9.7
since I am using ssd image base backup, I simply restored an earlier OS image where python wasnt installed at all to ensure there is no garbage left e.g. from an uninstall proces.
I installed python 3.9.7 x64 on windows 10 latest version, just as it was before.
Problem:

for some reason, the EXACT SAME code with the EXACT same json settings file, which was perfectly compiled to exe and executed earlier, now, throws the following error during execution:
ImportError: Module 'pythoncom' isn't in frozen sys.path ['C:\Users\Master\AppData\Local\Temp_MEI47642\base_library.zip', 'C:\Users\Master\AppData\Local\Temp_MEI47642\lib-dynload', 'C:\Users\Master\AppData\Local\Temp_MEI47642']

All required dirs are added.

All modules and submodules are imported.

Cache emptied.

Both python and python/scripts added to os syst path variable

Still not work. what previously worked like a charm.

I am sure the problem is on my side, eventhough it is same evironment, code and process, but there is no miracle, something must had been changed what i overlook otherwise it would not give an error.
May I ask if you could guide me, what he heck could be the problem ?

Originally created by @madtatu-development on GitHub (Nov 4, 2021). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/210 Background: after I couldnt create the EXE after updating to Python 3.10,0, I had decided to go back to 3.9.7 since I am using ssd image base backup, I simply restored an earlier OS image where python wasnt installed at all to ensure there is no garbage left e.g. from an uninstall proces. I installed python 3.9.7 x64 on windows 10 latest version, just as it was before. Problem: for some reason, the EXACT SAME code with the EXACT same json settings file, which was perfectly compiled to exe and executed earlier, now, throws the following error during execution: ImportError: Module 'pythoncom' isn't in frozen sys.path ['C:\Users\Master\AppData\Local\Temp\_MEI47642\base_library.zip', 'C:\Users\Master\AppData\Local\Temp\_MEI47642\lib-dynload', 'C:\Users\Master\AppData\Local\Temp\_MEI47642'] All required dirs are added. All modules and submodules are imported. Cache emptied. Both python and python/scripts added to os syst path variable Still not work. what previously worked like a charm. I am sure the problem is on my side, eventhough it is same evironment, code and process, but there is no miracle, something must had been changed what i overlook otherwise it would not give an error. May I ask if you could guide me, what he heck could be the problem ?
kerem 2026-02-26 12:20:46 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@brentvollebregt commented on GitHub (Nov 4, 2021):

This may be an issue with mixed architectures for pywin32 and Python as hinted here. I would recommend reinstalling pywin32 through pip and seeing if that helps.

<!-- gh-comment-id:960651916 --> @brentvollebregt commented on GitHub (Nov 4, 2021): This may be an issue with mixed architectures for pywin32 and Python as [hinted here](https://stackoverflow.com/a/17950140). I would recommend reinstalling pywin32 through pip and seeing if that helps.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 4, 2022):

This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.

<!-- gh-comment-id:1004453479 --> @github-actions[bot] commented on GitHub (Jan 4, 2022): This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 9, 2022):

Closing issue due to no activity in more than 60 days.

<!-- gh-comment-id:1008202061 --> @github-actions[bot] commented on GitHub (Jan 9, 2022): Closing issue due to no activity in more than 60 days.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#190
No description provided.