Skip to content Skip to sidebar Skip to footer

Pyinstaller, Import Error: No Module Named Pywintypes

I want to create exe from a py script using pyinstaller. I wrote the following command in cmd 'pyinstaller --onefile --windowed filename.py', but there is an error showed by the cm

Solution 1:

You should try to work in a virtualenv if you are on Windows. I recommand Anaconda. You will be able to easily install most of python packages.

Once Anaconda is installed, just run conda install -c conda-forge pyinstaller=3.2.1 and you should be fine.

Hope this helps.

Solution 2:

In some case you have to manually mention modules that need to be packes through the keyword "--hidden-import

So in your case: pyinstaller --onefile --hidden-import=pywintypes --windowed filename.py

Post a Comment for "Pyinstaller, Import Error: No Module Named Pywintypes"