问题
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?
回答1:
The solution is indeed
import win32api
instead of import pywin32
!
来源:https://stackoverflow.com/questions/50683404/importerror-no-module-named-pywin32