what does @ mean in case of `pip install <package> @ path`?

Question:

I just came across this from a project on GitHub

pip install colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1602866480661/work

what does @ do ?
assuming it decides the path where to install, I tried using any path and it wouldn’t work like that

Also, why would we want to do so?
Also, what is the significance of file:///

Here is the link to the project

https://github.com/sstzal/DFRF/blob/main/requirements.txt

Thanks for your attention

Asked By: Sadaf Shafi

||

Answers:

This notation with an @ is specified here in the "Direct references" section of PEP 440.

The part after the @ is a direct reference to a location where the project can be installed from (i.e. the source, not the destination).

It can be URL to a file archive (sdist or wheel), or a VCS repository (git, for example).

The file:// notation is meant for the (local) filesystem protocol (as opposed to the https:// protocol for example).

Answered By: sinoroc
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.