uv icon indicating copy to clipboard operation
uv copied to clipboard

`uv pip install` cannot fetch requirement file from remote URL

Open kdeldycke opened this issue 6 months ago • 4 comments

Trying to install packages from a requirements.txt file that is available on a remote URL is not supported:

$ uv pip install --requirement https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements.txt
error: failed to open file `https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements.txt`
  Caused by: No such file or directory (os error 2)

The same is working without any issue with pip:

$ python -m pip install --requirement https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements.txt
Collecting (...)
(...)
Successfully installed (...)

That being said, thanks for the fantastic initiative that is uv and good luck with the deluge of issues and reports following the launch! 🤗

kdeldycke avatar Feb 16 '24 12:02 kdeldycke

👍 Yeah this is something we don't support yet. I honestly didn't even know pip supported it :joy: Shouldn't be too hard to add.

charliermarsh avatar Feb 16 '24 14:02 charliermarsh

Is this something I can pick up as a first issue?

ottaviohartman avatar Feb 16 '24 23:02 ottaviohartman

@omh1280 feel free to give it a try!

zanieb avatar Feb 17 '24 04:02 zanieb

Thanks @zanieb !

I opened a draft PR into my fork since it's still WIP. I will keep trying to get it to work, but I would appreciate any help to get me unstuck. I've left some comments with questions on that PR.

ottaviohartman avatar Feb 17 '24 23:02 ottaviohartman

This just merged and will be supported in the next release: https://github.com/astral-sh/uv/pull/2081

charliermarsh avatar Mar 06 '24 04:03 charliermarsh