You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if there is any documentation anywhere that describes why some packages have their names remapped to something else. In particular I was curious about the requests package and the flask package. So if you have import requests in the code, pipreqs says "Found packages: {'requests'}", then "Found imports: Requests" but then "WARNING: Import named "Requests" not found locally. Trying to resolve it at the PyPI server." after which it ends up getting resolved to something like "requests:2.23.3", but then what gets written in the requirements file is "Requests==2.23.3"
Even in like a pip show requests, the name of the package is lowercase, so I'm not sure where this reference to a capitalized Requests package is coming from.
It's not a huge issue I suppose, it does warn you it didn't find it and is putting some other version into the requirements. Is this just something one should watch out for? For what its worth I've noticed it so far with requests and flask. And maybe flask is an even weirder example because on PyPI it says to install it with pip install Flask but the usage is from flask import Flask....
Sorry if this has been asked before and I just didn't find it, thanks for the work on this cool project
The text was updated successfully, but these errors were encountered:
I was wondering if there is any documentation anywhere that describes why some packages have their names remapped to something else. In particular I was curious about the requests package and the flask package. So if you have
import requests
in the code, pipreqs says "Found packages: {'requests'}", then "Found imports: Requests" but then "WARNING: Import named "Requests" not found locally. Trying to resolve it at the PyPI server." after which it ends up getting resolved to something like "requests:2.23.3", but then what gets written in the requirements file is "Requests==2.23.3"I guess I don't really understand why this happens? I mean I understand how I guess, because its listed here in the mapping file https://github.com/bndr/pipreqs/blob/master/pipreqs/mapping#L994, but yeah not sure why.
Even in like a
pip show requests
, the name of the package is lowercase, so I'm not sure where this reference to a capitalized Requests package is coming from.It's not a huge issue I suppose, it does warn you it didn't find it and is putting some other version into the requirements. Is this just something one should watch out for? For what its worth I've noticed it so far with requests and flask. And maybe flask is an even weirder example because on PyPI it says to install it with
pip install Flask
but the usage isfrom flask import Flask
....Sorry if this has been asked before and I just didn't find it, thanks for the work on this cool project
The text was updated successfully, but these errors were encountered: