pip install pywin32 didn't work for me but pypiwin32 did.

Answer from Mitch44 on Stack Overflow
🌐
Reddit
reddit.com › r/learnpython › no module named ’win32com’ error
r/learnpython on Reddit: No module named ’win32com’ error
August 10, 2022 -

Complete beginner in Python so excuse me for any terminology errors and such.

I installed pywin32 using pip install pywin32 as well as pypiwin32 in the same way, both appear in the pip list on the command prompt. However, when I try to import win32com.client (”import win32com.client as client”) in PyCharm, it gives me the following error: ”ModuleNotFoundError: No module named ’win32com’”.

Tried to Google for this error, but it seems everyone is saying that I don’t have pywin32 or pypiwin32 installed, which according to the pip list I do.

Does anyone have an idea of how I could fix this error? I’m on Windows 10 if that matters. Thanks in advance!

Discussions

No module named 'win32com'
Traceback (most recent call last): ...cd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "C:\python\lib\site-packages\pyttsx3\drivers\sapi5.py", line 3, in import win32com.client ModuleNotFoundError: No module ... More on github.com
🌐 github.com
7
August 2, 2018
Win32com.client
Hi everyone I am trying to create a log using win32com.client module - I have installed the module with the following command - pip install pywin32 - Installation was successful. However when I tried to run the below script I get the following error. The Python Win32 extensions for NT (service, ... More on discuss.python.org
🌐 discuss.python.org
11
0
June 18, 2022
python - Installed pywin 32 -- still getting error -- "No module named win32com.client." - Geographic Information Systems Stack Exchange
I'm trying to install pywin32 (32 bit 2.7) so that I can run python from ArcGIS 10.2.1 (32 bit), and have access to the pywin modules. But I am getting the error "No module named win32com.client." I More on gis.stackexchange.com
🌐 gis.stackexchange.com
ModuleNotFoundError: No module named 'win32com.shell' when importing winshell
Nuitka version 1.6rc7 Commercial: None Python: 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 19:43:38) [MSC v.1934 32 bit (Intel)] Flavor: CPython Official Executable: C:\Users\sw2719\AppData\Local\Pro... More on github.com
🌐 github.com
4
April 18, 2023
Top answer
1 of 4
36
  1. Start a command line with admin rights.

  2. python -m pip install pywin32

  3. C:\Program Files\Stackless36\Scripts>python pywin32_postinstall.py -install The path C:\Program Files\Stackless36\ should be replaced with the path at which your Python version is installed.

  4. Test (admin rights optional) using python -c "import win32com" or python speak.py

    where speak.py consists of this text:

    import win32com.client
    
    speaker = win32com.client.Dispatch("SAPI.SpVoice")
    speaker.Speak("It works. Hoorah!")
    

Working fine on Python 3.6.4 Stackless 3.1b3 060516 (v3.6.4-slp:9557b2e530, Dec 21 2017, 15:23:10) [MSC v.1900 64 bit (AMD64)] on win32. Vanilla CPython hangs out here:

C:\Users\C\AppData\Local\Programs\Python\Python36-32>python.exe
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32com.client
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'win32com'
>>> exit()

C:\Users\C\AppData\Local\Programs\Python\Python36-32>python.exe -m pip install pywin32
Collecting pywin32
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/d4/2d/b927e61c4a2b0aaaab72c8cb97cf748c319c399d804293164b0c43380d5f/pywin32-223-cp36-cp36m-win32.whl (8.3MB)
    100% |████████████████████████████████| 8.3MB 50kB/s
Installing collected packages: pywin32
Successfully installed pywin32-223
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
2 of 4
4

Check sys.path to make sure the directory where the module is installed is in there, otherwise you have to add it (google PYTHONPATH windows for some help with that.)

🌐
GitHub
github.com › nateshmbhat › pyttsx3 › issues › 23
No module named 'win32com' · Issue #23 · nateshmbhat/pyttsx3
August 2, 2018 - Traceback (most recent call last): ...cd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "C:\python\lib\site-packages\pyttsx3\drivers\sapi5.py", line 3, in import win32com.client ModuleNotFoundError: No module ...
Author   nateshmbhat
🌐
Esri Community
community.esri.com › t5 › python-questions › win32-com-client › td-p › 73379
Solved: Win32.com client - Esri Community
May 31, 2017 - I got new pc and working on update my scripts. I am getting 'No module named win32com.client' on of them and I can quit remember how it is installed. I have 10.4.1 and python 2.7.10 that came with it. I believe i have download the correct one 'ad3‑2.0.2‑cp27‑cp27m‑win_amd64.whl' now i am trying to i...
🌐
Python.org
discuss.python.org › python help
Win32com.client - Python Help - Discussions on Python.org
June 18, 2022 - Hi everyone I am trying to create a log using win32com.client module - I have installed the module with the following command - pip install pywin32 - Installation was successful. However when I tried to run the below script I get the following error. The Python Win32 extensions for NT (service, ...
Find elsewhere
🌐
Safe Community
community.safe.com › home › forums › fme form › general › can you use win32com with the python interpreter in fme desktop?
Can you use win32com with the Python interpreter in FME Desktop? | Community
February 12, 2022 - You may need to change the paths to point to where you have downloaded win32com. import sys sys.path.insert(0,r'C:\Users\<user>\Documents\FME\Plugins\Python\python38\win32') sys.path.insert(0,r'C:\Users\<user>\Documents\FME\Plugins\Python\p...
🌐
Stack Exchange
gis.stackexchange.com › questions › 265905 › installed-pywin-32-still-getting-error-no-module-named-win32com-client
python - Installed pywin 32 -- still getting error -- "No module named win32com.client." - Geographic Information Systems Stack Exchange
I'm trying to install pywin32 (32 bit 2.7) so that I can run python from ArcGIS 10.2.1 (32 bit), and have access to the pywin modules. But I am getting the error "No module named win32com.client." I installed from here.
🌐
GitHub
github.com › Nuitka › Nuitka › issues › 2185
ModuleNotFoundError: No module named 'win32com.shell' when importing winshell · Issue #2185 · Nuitka/Nuitka
April 18, 2023 - python -m nuitka --standalone main.py Also tried --include-package=win32com but didn't make any difference. Compilation goes without issues but following error occurs when running the compiled executable: Traceback (most recent call last): File "C:\Users\sw2719\Desktop\TESTGR~1\MAIN~1.DIS\main.py", line 1, in <module> File "C:\Users\sw2719\Desktop\TESTGR~1\MAIN~1.DIS\winshell.py", line 32, in <module winshell> ModuleNotFoundError: No module named 'win32com.shell' Please let me know if I did anything wrong, more info is needed or this is just unsupported.
Author   Nuitka
🌐
GitHub
github.com › emscripten-core › emscripten › issues › 19679
emrun --system_info throws "No module named 'win32com'" on windows · Issue #19679 · emscripten-core/emscripten
June 22, 2023 - This is a low priority bug of a forgotten dependency resulting in some errors when using emrun, but otherwise not impacting its usage. Version of emscripten/emsdk: emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3....
Author   emscripten-core
🌐
GitHub
github.com › Nuitka › Nuitka › issues › 787
windows win32com: ModuleNotFoundError: No module named 'win32com.gen_py.00020905-0000-0000-C000-000000000046x0x8x7' · Issue #787 · Nuitka/Nuitka
July 12, 2020 - Traceback (most recent call last): File "r:\test\testMSOffice.dist\testMSOffice.py", line 8, in <module> File "r:\test\testMSOffice.dist\win32com\client\gencache.py", line 534, in EnsureDispatch File "r:\test\testMSOffice.dist\win32com\client\gencache.py", line 518, in EnsureModule File "r:\test\testMSOffice.dist\win32com\client\gencache.py", line 287, in MakeModuleForTypelib File "r:\test\testMSOffice.dist\win32com\client\makepy.py", line 286, in GenerateFromTypeLibSpec File "r:\test\testMSOffice.dist\win32com\client\gencache.py", line 548, in AddModuleToCache File "r:\test\testMSOffice.dist\win32com\client\gencache.py", line 627, in _GetModule ModuleNotFoundError: No module named 'win32com.gen_py.00020905-0000-0000-C000-000000000046x0x8x7'
Author   Nuitka
🌐
51CTO
blog.51cto.com › hunkz › 1891024
no module named win32com.client 错误解决
January 11, 2017 - The security policy of this website has blocked you from further access. Contact the site owner and provide the Request ID shown on this page · If you are the owner of this website: Refer to the EdgeOne Web Security Analytics documentation for further instructions
🌐
PyXLL
support.pyxll.com › hc › en-gb › articles › 4404027796627--DLL-load-failed-The-specified-procedure-could-not-be-found-when-importing-win32api-or-win32com
"DLL load failed: The specified procedure could not be found" when importing win32api or win32com – PyXLL
July 21, 2021 - The problem occurs because the Python module win32api or win32com loads the wrong version of its DLL component, either "pythoncomXX.dll" or "pywintypesXX.dll". To resolve this issue you should completely uninstall the pywin32 package and remove ...
🌐
Google Groups
groups.google.com › g › spyderlib › c › W-v322YKPSg
Help: No module named 'pywintypes' when importing win32com.client
File "C:\Users\abc\AppData\Local\Programs\Spyder\pkgs\win32com\__init__.py", line 6, in <module> import pythoncom · File "C:\Users\abc\AppData\Local\Programs\Spyder\pkgs\pythoncom.py", line 2, in <module> import pywintypes · ModuleNotFoundError: No module named 'pywintypes' I copied these files (pythoncom38.dll + pywintypes38.dll + pythoncom37.dll and pywintypes37.dll) from ·
🌐
Super User
superuser.com › questions › 1315657 › error-with-python-win32com
python3 - Error with Python win32com - Super User
import win32com.client Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'win32com'
🌐
GitHub
github.com › pyinstaller › pyinstaller › issues › 3733
win32com module not found with v3.4 · Issue #3733 · pyinstaller/pyinstaller
September 11, 2018 - Per @htgoebel I'm splitting this out from #3730 as a standalone issue. Python: 3.6.4 PyInstaller: 3.4 OS: Windows 10 With PyInstaller v3.4 I see errors related to win32com when bundling: 9279 INFO: Loading module hook "hook-pkg_resources...
Author   pyinstaller