arsenal88
arsenal88

Reputation: 1160

Install all whl files from a directory

I am trying to gather files for an offline install of folder.

On one machine, I did pip download -r requirements.txt -d wheelhouse, where wheelhouse is a directory where all my whl's will be.

I then moved the wheelhouse directory to the remote machine (has no network access). I have miniconda installed on that machine. How can I install all whl files from that directory in one swift command?

Also, whenever I try to even install individual files (pip install {path to.whl file}), i'm getting

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)'))) - skipping

But I don't want to fetch it from an online repository as it's already on that machine.

Help appreciated!

Upvotes: 10

Views: 22206

Answers (1)

Abbas
Abbas

Reputation: 171

Move the wheels folder and install from there

pip install --no-index --find-links=wheels/ -r requirements.txt

"--no-index" argument avoids searching the PyPI indexes "--find-links" is an array of locations to look for certain packages. You can pass it file paths, individual URLs to TAR or WHEEL files, HTML files, git repositories and more.

Upvotes: 13

Related Questions