-
Notifications
You must be signed in to change notification settings - Fork 3k
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
'file:' identifier in '--requirements' argument yields FileNotFoundError #10237
Comments
Feel free to submit a PR for better error messages, but this is not a bug. |
Hi @uranusjr. If you want (and if no one is working on it, of course), I can open a pull request for the next week. Just tell me where to go to adjust the error message. I'm not an expert with Conda (I actually don't use it on my work), but this issue doesn't seems to be really hard. |
I think the conda env part is not relevant; this is only caused by appending I traced the code a bit and it seems like the error is originated from pip/src/pip/_internal/network/session.py Lines 218 to 235 in 87aee20
This error_message = f"{type(exc).__name__}: {exc}"
resp.raw = io.BytesIO(error_message.encode("utf8")) Or you can try out things in |
Ok. I'll take a look on it later. Thanks @uranusjr! It doesn't seems too hard, so I can do it on these days. |
Incidentally, file://requirements.txt does not work: `ValueError: non-local file URIs are not supported on this platform: 'file://requirements.txt'`
Work Around pypa/pip#10237
@DiddiLeija @pradyunsg thanks for addressing this! <3 |
Description
Using a
file:
identifier when providing a--requirements|-r
argument results inFileNotFoundError
.Expected behavior
The file should be found.
Previous versions worked fine. Alternatively, omitting the
file:
identifier works.pip version
21.2.1
Python version
3.9.6
OS
MacOS 10.14
How to Reproduce
Create and activate Conda environment with:
Create
requirements.txt
:Run install command:
Error.
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: