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

'requests' distribution not found when listed in install_requires together with requests_oauthlib #490

Open
akenney opened this issue Apr 13, 2022 · 0 comments

Comments

@akenney
Copy link

akenney commented Apr 13, 2022

This error may somehow be specific to my environment but I'm not sure how. I posted on Stackoverflow and didn't get any responses.

I have a setup.py file for a python package and when I try to run python setup.py develop it gets stuck on installing the requests package, apparently because of requests_oauthlib also being a requirement. The following minimal example setup.py file still results in the same error:

from setuptools import setup

setup(
    name='fakepackage',
    install_requires=[
        'requests_oauthlib',
        'requests',
    ]
)

The error is "error: The 'requests' distribution was not found and is required by fakepackage". This happens regardless of the order in which I list the elements of the install_requires list.

If I run pip install requests manually, it installs fine, so I'm not sure what it's not finding. If I don't list requests at all in the setup.py file, and only list requests_oauthlib, it also installs fine (including installing requests, because it's a dependency of requests_oauthlib).

I'm using Python 3.8.10, setuptools version 44.0.0.

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

No branches or pull requests

1 participant