24

I have installed python 3.5, and need to install pywin (pywin32)

however, pip cannot find it. Note, i have just PIP install'ed send2trash and gitpython successfully

 Could not find a version that satisfies the requirement pywin32 (from versions: )

A few possibly relevant data points:

  • new install of python 3.5
  • windows 7 x64
  • python 2.7 was previously installed on the machine
  • as mentioned, several other packages were installed fine via PIP
  • running these commands from git-bash, which came from the git windows installer, installed some time ago. -- I have gnu grep in my path, so i believe i selected the git installer option to put the whole mysys toolchain in my path

full --verbose output:

C:\Users\USER>pip install  pywin32    --proxy http://proxy.COMPANY.com:8080
Collecting pywin32
  Could not find a version that satisfies the requirement pywin32 (from versions: )
No matching distribution found for pywin32

C:\Users\USER>pip install  pywin32    --proxy http://proxy.COMPANY.com:8080 --verbose
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Collecting pywin32
  1 location(s) to search for versions of pywin32:
  * https://pypi.python.org/simple/pywin32/
  Getting page https://pypi.python.org/simple/pywin32/
  Looking up "https://pypi.python.org/simple/pywin32/" in the cache
  Current age based on date: 61
  Freshness lifetime from max-age: 600
  Freshness lifetime from request max-age: 600
  The response is "fresh", returning cached response
  600 > 61
  Analyzing links from page https://pypi.python.org/simple/pywin32/
  Could not find a version that satisfies the requirement pywin32 (from versions: )
Cleaning up...
No matching distribution found for pywin32
Exception information:
Traceback (most recent call last):
  File "c:\users\USER\appdata\local\programs\python\python35\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\USER\appdata\local\programs\python\python35\lib\site-packages\pip\commands\install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "c:\users\USER\appdata\local\programs\python\python35\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "c:\users\USER\appdata\local\programs\python\python35\lib\site-packages\pip\req\req_set.py", line 554, in _prepare_file
    require_hashes
  File "c:\users\USER\appdata\local\programs\python\python35\lib\site-packages\pip\req\req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "c:\users\USER\appdata\local\programs\python\python35\lib\site-packages\pip\index.py", line 514, in find_requirement
    'No matching distribution found for %s' % req
pip.exceptions.DistributionNotFound: No matching distribution found for pywin32 

9 Answers 9

12

I think you need to use pypiwin32 instead. See How do you install pywin32 from a binary file in tox on Windows?

0
9

I think you could use pip install pypiwin32 instead.

1
  • Had both pypiwin32 and pywin32 as well as twisted_iocpsupport in my requirements.txt file. However, after trying to build using docker compose up, faced a pypwin32 error. What worked was, I deleted the above three files and, successfully built the docker image file Commented May 10 at 12:00
5

I have seen this thread referenced by people who were seeing the same pip error message on Linux or other systems -- even though the title clearly specifies "(on windows)".

For users of Linux, Unix, MacOS, etc., let me make it perfectly clear that pywin32 is a wrapper for Windows system calls, and only works on Windows. (except under WINE).

The advise to use an obsolete version of pywin32 when you are running an obsolete version of Python is correct -- if you are running on Windows.

Let me also mention the "pypiwin32" is not a supported source. "pywin32" is official, and binary installers are maintained for all versions of Python which are then currently supported.

0
1

My problem was that pypiwin32 is only supported on Python 3.5+.

1

If you are using a Python 3.5+ then you could add pypiwin32==223 to your requirements.txt file instead of pywin32

0
1

As suggested in this GitHub thread, one way to fix it is to use os env filters in your requirements.txt :

pywin32==<version>; platform_system=="Windows"
1

The solution might be to remove pywin32 from your requirements.txt.

I develop on Windows and deploy to Lixux in Docker. When I do a freeze my requirements, it's adding pywin32 into the requirements but I don't actually need it for my deployments, so my solution is to remove it.

0

The pypi index mentions that pywin32 is not supported for python 3.5, only till python 3.3. https://pypi.python.org/pypi/pywin32. Which is why you are getting the error.

However, you can install it from here as a binary package. It should work. I have used xlwings with pyton 3.6.2, which requires pywin32. Pywin32 build 220, works fine atleast for the functions I needed.

1
  • 1
    I'm running Python 2.7.10 and I still get the same error when I try to "pip install pywin32", does anyone happen to know why?
    – MACC
    Commented Jun 19, 2018 at 5:52
-1

If anyone still looking for pywin32 for python34, here is the link. Download and install. This resolves the issue https://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.