简体   繁体   中英

Not able to use the win32gui module from pywin32 in Pycharm

I'm using Python 3.7 with Pycharm. I've installed the pywin32 package for this project because win32api isn't compatible with Python 3.7+.

import win32con
import win32gui

I'm trying to import these modules with pywin32 installed but this doesn't work. The problem only started happening after I uninstalled and reinstalled Pycharm and had to reinstall all my packages for this project. I'm using the exact same interpreter as I was before. Why would this be happening?

There is a post installation step to follow:

To install pywin32 system files, run python.exe Scripts/pywin32_postinstall.py -install from an elevated command prompt.

Did you run this command?

See also https://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM