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.
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!