pythonwindowswindows-7-x64pywin32

ImportError: No module named pywin32


I tried both

pip install pypiwin32

and

pip install pywin32

and they both succeeded on my Windows 7 x64 / Python 2.7.15 64-bit (it's the only Python I have installed on my PC). I even did:

python C:\Python27\Scripts\pywin32_postinstall.py -install

and it successfully returned:

...
Shortcut to documentation created
The pywin32 extensions were successfully installed.

Still I get, when doing import pywin32:

ImportError: No module named pywin32

How to install pywin32 on Windows 7?


Solution

  • The solution is indeed

    import win32api
    

    instead of import pywin32!