When freezing Python codes with modules like pyinstaller or aut_py_to_exe, there are possibilities that some modules might not work as they specifically require certain functions from the Interpreter.
As @Aaron mentioned, putting the multiprocessing.freeze_support() will do.
But sometimes, the freeze_support() might have to be put before import as specified by pyinstaller's documentation:
This might be necessary if your script imports a module that does one of the following during its initialization (i.e., when it is imported):
- makes use of multiprocessing functionality.
- parses command-line arguments for your program.
- imports and initializes a GUI framework. While this might not result in an error, it should be avoided in the worker processes by diverting the program flow before it happens.
They provided a detailed explanation of the multiprocessing module with freezing codes; You can get much information from it.