Skip to main content

pywin32

CI PyPI - Version PyPI - Python Version PyPI - Downloads License - PSF-2.0


This is the readme for the Python for Win32 (pywin32) extensions, which provides access to many of the Windows APIs from Python, including COM support.

See CHANGES.txt for recent notable changes.

adodbapi's documentation can be found in: adodbapi/readme.txt

isapi's documentation can be found in: isapi/README.txt

Docs

The docs are a long and sad story, but there's now an online version of the PyWin32.chm helpfile (thanks @ofek!). Lots of that is very old, but some is auto-generated and current. Would love help untangling the docs!

You can get type hints, signatures and annotations from types-pywin32.

Support

Feel free to open issues for all bugs (or suspected bugs) in pywin32. pull-requests for all bugs or features are also welcome.

Type stubs currently live in typeshed. Any issue or request related to static type-checking and IntelliSense should be raised there.

However, please do not open GitHub issues for general support requests, or for problems or questions using the modules in this package - they will be closed. For such issues, please email the python-win32 mailing list - note that you must be subscribed to the list before posting.

Binaries

Binary releases are no longer supported.

Build 306 was the last with .exe installers. You really shouldn't use them, but if you really need them, find them here

Installing via PIP

You should install pywin32 via pip - eg,

python -m pip install --upgrade pywin32

There is a post-install script (see below) which should not be run inside virtual environments; it should only be run in "global" installs.

For unreleased changes, you can download builds made by github actions - choose any "workflow" from the main branch and download its "artifacts"

Installing globally

Outside of a virtual environment you might want to install COM objects, services, etc. You can do this by executing:

python -m pywin32_postinstall -install

or (shorter but you don't have control over which python environment is used)

pywin32_postinstall -install

If you do this with normal permissions it will be global for your user (a few files will be copied to the root of your Python install and some changes made to HKCU). If you execute this from an elevated process, it will be global for the machine (files will be copied to System32, HKLM will be changed, etc)

Installing for MingGW/msys2

The folks at https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python-pywin32 are graciously keeping an updated set of patches to install pywin32 for MingGW/msys2.

We'd suggest installing from https://packages.msys2.org/base/mingw-w64-python-pywin32 pacman -S mingw-w64-python-pywin32.

We're open to seeing these patches be upstreamed in pywin32 if they can be tested automatically on the CI.

Running as a Windows Service

To run as a service, you probably want to install pywin32 globally from an elevated command prompt - see above.

You also need to ensure Python is installed in a location where the user running the service has access to the installation and is able to load pywintypesXX.dll and pythonXX.dll. In particular, the LocalSystem account typically will not have access to your local %USER% directory structure.

Troubleshooting

If you encounter any problems when upgrading like the following:

The specified procedure could not be found
Entry-point not found

It usually means one of 2 things:

  • You've upgraded an install where the post-install script was previously run. So you should run it again:

    python -m pywin32_postinstall -install
    

    or (shorter but you don't have control over which python environment is used)

    pywin32_postinstall -install
    

    This will make some small attempts to cleanup older conflicting installs.

  • There are other pywin32 DLLs installed in your system, but in a different location than the new ones. This sometimes happens in environments that come with pywin32 pre-shipped (eg, anaconda?).

    The possible solutions here are:

    • Run the "post_install" script documented above.
    • Otherwise, find and remove all other copies of pywintypesXX.dll and pythoncomXX.dll (where XX is the Python version - eg, "39")

Building from source

Install Visual Studio 2019 (later probably works, but options might be different), follow the instructions in Build environment for the version you install.

Then follow the Build instructions for the build itself (including ARM64 cross-compilation).

Release process

The following steps are performed when making a new release - this is mainly to form a checklist so @mhammond doesn't forget what to do :)

Since build 307 the release process is based on the artifacts created by Github actions.

  • Ensure CHANGES.txt has everything worth noting. Update the header to reflect the about-to-be released build and date, commit it.

  • Update setup.py with the new build number. Update CHANGES.txt to have a new heading section for the next unreleased version. (ie, a new, empty "Coming in build XXX, as yet unreleased" section)

  • Push these changes to github, wait for the actions to complete, then download the artifacts from that run.

  • Upload .whl artifacts to pypi - we do this before pushing the tag because they might be rejected for an invalid README.md. Done via py -3.? -m twine upload dist/*XXX*.whl.

  • Create a new git tag for the release.

  • Update setup.py with the new build number + ".1" (eg, 123.1), to ensure future test builds aren't mistaken for the real release.

  • Make sure everything is pushed to github, including the tag (ie, git push --tags)

  • Send mail to python-win32

Older Manual Release Process

This is the old process used when a local dev environment was used to create the builds. Build 306 was the last released with this process.

  • Ensure CHANGES.txt has everything worth noting. Update the header to reflect the about-to-be released build and date, commit it.

  • Update setup.py with the new build number.

  • Execute make_all.bat, wait forever, test the artifacts.

  • Upload .whl artifacts to pypi - we do this before pushing the tag because they might be rejected for an invalid README.md. Done via py -3.? -m twine upload dist/*XXX*.whl.

  • Commit setup.py (so the new build number is in the repo), create a new git tag

  • Upload the .exe installers to github.

  • Update setup.py with the new build number + ".1" (eg, 123.1), to ensure future test builds aren't mistaken for the real release.

  • Make sure everything is pushed to github, including the tag (ie, git push --tags)

  • Send mail to python-win32

Metadata

Release files for pywin32 310

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pywin32 310
File
pywin32-310-cp313-cp313-win_arm64.whl CPython 3.13 CPython 3.13 Windows ARM64 Details
pywin32-310-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pywin32-310-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details
pywin32-310-cp312-cp312-win_arm64.whl CPython 3.12 CPython 3.12 Windows ARM64 Details
pywin32-310-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pywin32-310-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
pywin32-310-cp311-cp311-win_arm64.whl CPython 3.11 CPython 3.11 Windows ARM64 Details
pywin32-310-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pywin32-310-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
pywin32-310-cp310-cp310-win_arm64.whl CPython 3.10 CPython 3.10 Windows ARM64 Details
pywin32-310-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pywin32-310-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
pywin32-310-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
pywin32-310-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details
pywin32-310-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
pywin32-310-cp38-cp38-win32.whl CPython 3.8 CPython 3.8 Windows x86-32 Details

Total release size: 144.2 MB

Release files / pywin32-310-cp313-cp313-win_arm64.whl

Download URL pywin32-310-cp313-cp313-win_arm64.whl
Size 8.5 MB
Tags CPython 3.13 Windows ARM64
SHA-256 checksum
How to use checksums
e308f831de771482b7cf692a1f308f8fca701b2d8f9dde6cc440c7da17e47b33
BLAKE2b-256 checksum
How to use checksums
b4f4f785020090fb050e7fb6d34b780f2231f302609dc964672f72bfaeb59a28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp313-cp313-win_amd64.whl

Download URL pywin32-310-cp313-cp313-win_amd64.whl
Size 9.5 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
667827eb3a90208ddbdcc9e860c81bde63a135710e21e4cb3348968e4bd5249e
BLAKE2b-256 checksum
How to use checksums
453cb4640f740ffebadd5d34df35fecba0e1cfef8fde9f3e594df91c28ad9b50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp313-cp313-win32.whl

Download URL pywin32-310-cp313-cp313-win32.whl
Size 8.8 MB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
5d241a659c496ada3253cd01cfaa779b048e90ce4b2b38cd44168ad555ce74ab
BLAKE2b-256 checksum
How to use checksums
1c099c1b978ffc4ae53999e89c19c77ba882d9fce476729f23ef55211ea1c034
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp312-cp312-win_arm64.whl

Download URL pywin32-310-cp312-cp312-win_arm64.whl
Size 8.5 MB
Tags CPython 3.12 Windows ARM64
SHA-256 checksum
How to use checksums
2349cc906eae872d0663d4d6290d13b90621eaf78964bb1578632ff20e152966
BLAKE2b-256 checksum
How to use checksums
1f329ccf53748df72301a89713936645a664ec001abd35ecc8578beda593d37d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp312-cp312-win_amd64.whl

Download URL pywin32-310-cp312-cp312-win_amd64.whl
Size 9.5 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
bf5c397c9a9a19a6f62f3fb821fbf36cac08f03770056711f765ec1503972060
BLAKE2b-256 checksum
How to use checksums
e3e5b0627f8bb84e06991bea89ad8153a9e50ace40b2e1195d68e9dff6b03d0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp312-cp312-win32.whl

Download URL pywin32-310-cp312-cp312-win32.whl
Size 8.8 MB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
8a75a5cc3893e83a108c05d82198880704c44bbaee4d06e442e471d3c9ea4f3d
BLAKE2b-256 checksum
How to use checksums
6bec4fdbe47932f671d6e348474ea35ed94227fb5df56a7c30cbbb42cd396ed0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp311-cp311-win_arm64.whl

Download URL pywin32-310-cp311-cp311-win_arm64.whl
Size 8.5 MB
Tags CPython 3.11 Windows ARM64
SHA-256 checksum
How to use checksums
19ec5fc9b1d51c4350be7bb00760ffce46e6c95eaf2f0b2f1150657b1a43c582
BLAKE2b-256 checksum
How to use checksums
90b1ac8b1ffce6603849eb45a91cf126c0fa5431f186c2e768bf56889c46f51c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp311-cp311-win_amd64.whl

Download URL pywin32-310-cp311-cp311-win_amd64.whl
Size 9.5 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
126298077a9d7c95c53823934f000599f66ec9296b09167810eb24875f32689c
BLAKE2b-256 checksum
How to use checksums
b3bdd1592635992dd8db5bb8ace0551bc3a769de1ac8850200cfa517e72739fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp311-cp311-win32.whl

Download URL pywin32-310-cp311-cp311-win32.whl
Size 8.8 MB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
1e765f9564e83011a63321bb9d27ec456a0ed90d3732c4b2e312b855365ed8bd
BLAKE2b-256 checksum
How to use checksums
f7b168aa2986129fb1011dabbe95f0136f44509afaf072b12b8f815905a39f33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp310-cp310-win_arm64.whl

Download URL pywin32-310-cp310-cp310-win_arm64.whl
Size 8.5 MB
Tags CPython 3.10 Windows ARM64
SHA-256 checksum
How to use checksums
33babed0cf0c92a6f94cc6cc13546ab24ee13e3e800e61ed87609ab91e4c8213
BLAKE2b-256 checksum
How to use checksums
3c841a8e3d7a15490d28a5d816efa229ecb4999cdc51a7c30dd8914f669093b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp310-cp310-win_amd64.whl

Download URL pywin32-310-cp310-cp310-win_amd64.whl
Size 9.6 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
c3e78706e4229b915a0821941a84e7ef420bf2b77e08c9dae3c76fd03fd2ae3d
BLAKE2b-256 checksum
How to use checksums
aafed873a773324fa565619ba555a82c9dabd677301720f3660a731a5d07e49a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp310-cp310-win32.whl

Download URL pywin32-310-cp310-cp310-win32.whl
Size 8.8 MB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
6dd97011efc8bf51d6793a82292419eba2c71cf8e7250cfac03bba284454abc1
BLAKE2b-256 checksum
How to use checksums
95daa5f38fffbba2fb99aa4aa905480ac4b8e83ca486659ac8c95bce47fb5276
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp39-cp39-win_amd64.whl

Download URL pywin32-310-cp39-cp39-win_amd64.whl
Size 9.6 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
96867217335559ac619f00ad70e513c0fcf84b8a3af9fc2bba3b59b97da70475
BLAKE2b-256 checksum
How to use checksums
93ff2a8c10315ffbdee7b3883ac0d1667e267ca8b3f6f640d81d43b87a82c0c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp39-cp39-win32.whl

Download URL pywin32-310-cp39-cp39-win32.whl
Size 8.8 MB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
851c8d927af0d879221e616ae1f66145253537bbdd321a77e8ef701b443a9a1a
BLAKE2b-256 checksum
How to use checksums
a2cdd09d434630edb6a0c44ad5079611279a67530296cfe0451e003de7f449ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp38-cp38-win_amd64.whl

Download URL pywin32-310-cp38-cp38-win_amd64.whl
Size 9.6 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
30f0a9b3138fb5e07eb4973b7077e1883f558e40c578c6925acc7a94c34eaa36
BLAKE2b-256 checksum
How to use checksums
0c3b05f848971b3a44b35cd48ea0c6c648745be8bc5a3fc9f4df6f135c7f1e07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / pywin32-310-cp38-cp38-win32.whl

Download URL pywin32-310-cp38-cp38-win32.whl
Size 8.9 MB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
0867beb8addefa2e3979d4084352e4ac6e991ca45373390775f7084cc0209b9c
BLAKE2b-256 checksum
How to use checksums
46659c5b79424e344b976394f2b1bb4bedfa4cd013143b72b301a66e4b8943fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release history Release notifications | RSS feed

312

21 release files

311

20 release files

This release

310 This release

16 release files

309

16 release files

308

18 release files

307

18 release files

306

14 release files

305

14 release files

304

14 release files

303

12 release files

302

10 release files

301

10 release files

300

10 release files

228

12 release files

227

12 release files

226

12 release files

225

12 release files

224

8 release files

223

8 release files

222

7 release files

214

210

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page