Reputation: 61
so as the title says, I can't import pywintypes. I read through all the existing questions but failed to find a solution that works.
Here's my setup:
Python install: C:/Users/Username/AppData/Local/Programs/Python/Python39
Pip install directory: P:/pip
I guess the issue is that pip installs in the 'wrong directory' but here's what I tried so far: Copy both dlls from P:/pip/pywin32_system32 to:
pip install pywin32 &
pip install pypiwin32
I'm trying to initialize pyttsx3. Thank you in advance!
Upvotes: 5
Views: 5348
Reputation: 241
Just because this thread came up for me when I was asking my question, I'll post my "solution" here.
My problem was very strange because through cmd I could run python
and then simply import pywintypes
, but the call failed in IDLE and threw the module not found error.
The solution? Rebooting. Christ knows how many hours I spent going down this rabbit hole only for a reboot to be the solution ¯\_(ツ)_/¯
edit: I should also add that I followed a few other suggested solutions and copied certain .dll files to site-package directories and stuff like that. It may be related.
Upvotes: 0