python – How can I install packages using pip according to the requirements.txt file from a local directory?

python – How can I install packages using pip according to the requirements.txt file from a local directory?

This works for everyone:

pip install -r /path/to/requirements.txt

This works for me:

$ pip install -r requirements.txt --no-index --find-links file:///tmp/packages

--no-index – Ignore package index (only looking at --find-links URLs instead).

-f, --find-links <URL> – If a URL or path to an HTML file, then parse for links to archives.

If a local path or file:// URL thats a directory, then look for archives in the directory listing.

python – How can I install packages using pip according to the requirements.txt file from a local directory?

For virtualenv to install all files in the requirements.txt file.

  1. cd to the directory where requirements.txt is located
  2. activate your virtualenv
  3. run: pip install -r requirements.txt in your shell

Leave a Reply

Your email address will not be published. Required fields are marked *