Hi Eshleron, thank you for taking time and looking in to it. I managed to resolve the issue.
I was unsure of the conflict so have installed python from scratch on a new virtual machine and tried creating exe without installing any packages.
Installed packages that were only part of error logs.
finally found out that reason for the failure was related to hidden import "babel.numbers".
included that as parameter in hidden imports in auto-py-to-exe, and boom everything worked........
So now I have encountered "SystemExit: pre-safe-import-module hook failed, needs fixing." error myself. I've tried "babel.numbers" solution, didn't help. What helped me solve it was a combination of google search and intuition.
My error was something like this: "PyInstaller\hooks\pre_safe_import_module\hook-urllib3.packages.six.moves.py", line 33, in pre_safe_import_module"
First, as the internet suggested, I uninstalled "usual" Pyinstaller and installed Pyinstaller dev with: pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip.
That took care of this problem.
But then the second problem emerged: "ImportError: Module 'pywintypes' isn't in frozen sys.path". That was solved by excluding pywin32 from imports in Auto-py-to-exe (Pyinstaller).
I hope this helps someone sometime!
Good luck coding!
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Eshleron, thank you for taking time and looking in to it. I managed to resolve the issue.
I was unsure of the conflict so have installed python from scratch on a new virtual machine and tried creating exe without installing any packages.
Glad you got it fixed!
So now I have encountered "SystemExit: pre-safe-import-module hook failed, needs fixing." error myself. I've tried "babel.numbers" solution, didn't help. What helped me solve it was a combination of google search and intuition.
My error was something like this: "PyInstaller\hooks\pre_safe_import_module\hook-urllib3.packages.six.moves.py", line 33, in pre_safe_import_module"
First, as the internet suggested, I uninstalled "usual" Pyinstaller and installed Pyinstaller dev with:
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip.
That took care of this problem.
But then the second problem emerged: "ImportError: Module 'pywintypes' isn't in frozen sys.path". That was solved by excluding pywin32 from imports in Auto-py-to-exe (Pyinstaller).
I hope this helps someone sometime!
Good luck coding!