In pip there is an -f
option which does the following:
-f
,--find-links
: If a url or path to an html file, then parse for links to archives. If a local path orfile://
url that's a directory, then look for archives in the directory listing.
This is the preferred way of installing PyTorch, by setting the link to their overview website, e.g.:
pip3 install torch===1.3.0 -f https://download.pytorch.org/whl/torch_stable.html
For my virtual environments I use pipenv
but I haven't found an option that does the same as -f
. In the meantime, I can just look up the direct link to the package that is relevant for my system, but that is cumbersome.
Does pipenv provide a way to do the same thing as pip's -f?
For now, I haven't found a work-around. What you can do, of course, is enabling the pipenv shell and doing what you must with pip, e.g.
pipenv shell
python -m pip install torch===1.3.0 -f https://download.pytorch.org/whl/torch_stable.html
This will install torch in the pipenv environment but torch will not be added to the Pipfile (nor to the lock file).