Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install works, setuptools doesn't (Windows Python 3.6.8) #1320

Closed
fdav10 opened this issue Mar 14, 2019 · 5 comments · Fixed by #2396
Closed

pip install works, setuptools doesn't (Windows Python 3.6.8) #1320

fdav10 opened this issue Mar 14, 2019 · 5 comments · Fixed by #2396

Comments

@fdav10
Copy link

fdav10 commented Mar 14, 2019

I'm finding that installing pywin32 using pip succeeds whereas listing it as a dependency using the install_requires argument to setup in a setup.py file fails. This is on Windows 10 using Python 3.6.8 64 bit and pywin32==224.

My steps:

Pip install

  1. Set up an empty virtual env
  2. pip install pywin32
  3. python -c "import win32api"

Results in no output - i.e. successful imoprt

Setuptools

  1. Set up another fresh virtualenv
  2. create a minimal setup.py consisting of:
from setuptools import setup

setup(name='testpackage',
      version=1,
      install_requires=[
          "pywin32",
      ])
  1. at shell run python setup.py install
  2. python -c "import win32api"
  3. On my machine this results in
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'win32api'
@macginitie
Copy link

when I try "pip install pywin32" I get:
Could not find a version that satisfies the requirement pywin32 (from versions: )
No matching distribution found for pywin32

@Aareon
Copy link

Aareon commented Apr 11, 2019

Looks suspiciously like a circular dependency issue

@shriharshmishra
Copy link

when I try "pip install pywin32" I get:
Could not find a version that satisfies the requirement pywin32 (from versions: )
No matching distribution found for pywin32

I am also facing similar issue when running -
pip install -r requirements.txt and my requirement.txt contains pywin32==224

@Avasam
Copy link
Collaborator

Avasam commented Mar 14, 2024

3. at shell run python setup.py install

Note to readers that python setup.py and the use of setup.py as a command line tool are deprecated. pywin32 itself needs to move away from it. #2208

@Avasam
Copy link
Collaborator

Avasam commented Sep 11, 2024

@fdav10 Due to many changes in the Python packaging ecosystem and improvements to pywin32's own installation, could you try again using:

  • the latest pip
  • latest setuptools
  • Python>=3.8
  • pywin32 >= 226 (but preferably latest)

@shriharshmishra & @macginitie Could you also make sure you are trying to install from a Windows machine ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants