ImportError: No module named pywin32

北城余情 提交于 2020-08-27 21:59:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!