I'm working on a new project that needs a new virtualenv. When I do pip install -r requirements.txt, it downloads the packages all over again even though those packages already exist on the previous project's virtualenv.
Is there any way to tell pip to get the packages from the other virtualenv instead?
Overview. pip download does the same resolution and downloading as pip install , but instead of installing the dependencies, it collects the downloaded distributions into the directory provided (defaulting to the current directory).
To pip install more than one Python package, the packages can be listed in line with the same pip install command as long as they are separated with spaces. Here we are installing both scikit-learn and the statsmodel package in one line of code. You can also upgrade multiple packages in one line of code.
txt file contains. You can run pip list to display the packages you just installed, with their version numbers: Windows.
The pip download command can be used to download packages and their dependencies to the current directory (by default), or else to a specified location without installing them.
It's not the answer to your question but I guess it's what you want, i.e. avoiding the download: you can specify the environment variable PIP_DOWNLOAD_CACHE=/path/to/directory/where/downloaded/packages/will/be/stored Packages will be downloaded into this directory and if they are to be installed again, taken from this directory.
Got it from: http://tartley.com/?p=1133 and works fine for me
There is also the option --download-cache to the pip install command - I guess it does the same thing, but the environment variable is handier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With