Why python executable opens new window instance when function by multiprocessing module is called on windows

If you want to use multiprocessing as a frozen executable, you need to call multiprocessing.freeze_support() at the beginning of your main script. This will allow multiprocessing to “take over” when it spawns its worker processes. See also https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Multiprocessing

Pyinstaller with pygame

I searched a lot in the PyInstaller doc to get my own game working. I don’t know much about Ubuntu, but I got everything working in Windows and it should be very similar. The key here is to get PyInstaller to package your ressources (images, sounds, etc.) with your Python code. The best distribution is … Read more

Get all modules/packages used by a python project

You can give a try to the library https://github.com/bndr/pipreqs found following the guide https://www.fullstackpython.com/application-dependencies.html The library pipreqs is pip installable and automatically generates the file requirements.txt. It contains all the imports libraries with versions you are using in the virtualenv or in the python correctly installed. Just type: pip install pipreqs pipreqs /home/project/location It will … Read more

The ‘google-api-python-client’ distribution was not found and is required by the application with pyinstaller

Literally just ran into this issue on windows, whereas macOS is okay. I’m building with fbs and PyQt5. The Problem google-api-python-client is not a python module, but a resource, which means you cannot inject it as a hidden-import. googleapiclient.model reads the distribution info from google-api-python-client folder as a packaged resource. Your full error might look … Read more

How to install python application with tkcalendar module by pyinstaller?

The issue does not come from tkcalendar but from the fact that PyInstaller does not detect second level imports. A way to solve this issue is explained in tkcalendar’s documentation in the HowTos section: When bundling an application with PyInstaller, there is an issue with the detection of the babel dependency of tkcalendar. This can … Read more

Processes stuck in loop with PyInstaller-executable

You need to use multiprocessing.freeze_support() when you produce a Windows executable with PyInstaller. Straight out from the docs: multiprocessing.freeze_support() Add support for when a program which uses multiprocessing has been frozen to produce a Windows executable. (Has been tested with py2exe, PyInstaller and cx_Freeze.) One needs to call this function straight after the if name … Read more