ImportError: No module named pywintypes

Solution 1:

pywintypes is part of the Python for Windows extensions, otherwise known as pywin32. You'll need to install that to get access to pywintypes.

Note that as of this writing, pywin32's maintainer doesn't upload files to PyPI, so you have to get an appropriate version of installer from http://pywin32.sf.net.

Solution 2:

pip install pypiwin32 worked for me

Solution 3:

For me it worked to copy the files (pythoncom38.dll and pywintypes38.dll) from:

C:\Users\"Your user id"\AppData\Roaming\Python\Python38\site-packages\pywin32_system32

To the path:

C:\Users\"Your user id"\AppData\Roaming\Python\Python38\site-packages\win32\lib

and

C:\Users\"Your user id"\AppData\Roaming\Python\Python38\site-packages\win32
  • After installation of Visual Studio, I need sometimes to restart computer after copy the files.