Python 3.6 install win32api?
Asked Answered
N

2

25

Is there a way to install the win32api module for python 3.6 or do I have to change my version of python? Everytime I try to install it using pip I get the following error:

 Could not find a version that satisfies the requirement win32api (from versions: )
No matching distribution found for win32api 
Ninfaningal answered 21/2, 2017 at 14:39 Comment(1)
go on here sourceforge.net/projects/pywin32/files/pywin32/Build%20220Quiteria
Q
99

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

Quiteria answered 22/2, 2017 at 19:52 Comment(4)
Well, my project gets all the requirements through a requirements.txt which the IDE picks up and installs everything. Everything except pywin32, because it isn't on pip.Staphylo
Update, September 2019: pywin32 is now available from PyPI and installs the latest version (currently version 224). pypiwin32 currently installs an older version (223).Holocaine
@GordThompson Deleted my last comment as it was NLN, is there anything I have missed in the update? if not feel free to flag this comment the same when you have seen it.Quiteria
The one point that I think is worth making is to use python -mpip or py -3.n -mpip if you have more than one version of python installed (where n is the version of python3).Songstress
C
31

Take a look at this answer: ImportError: no module named win32api

You can use

pip install pypiwin32
Cozart answered 9/5, 2017 at 21:20 Comment(4)
is there any documentation for this api?Nonagon
ModuleNotFoundError: No module named 'pywin32'Gadoid
@VincentAlex is that when you are trying to install it, or when you are trying to import into your app?Quiteria
On importing to python3 3.8 on win7Gadoid

© 2022 - 2024 — McMap. All rights reserved.