Reset to default
Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.
It falls back to sorting by highest score if no posts are trending.
NOTE: Only wheels downloaded over HTTPS are cached. If you are using a custom repo over plain old HTTP, the cache is disabled.
For new Pip versions:
Newer Pip versions by default now cache downloads. See this documentation:
For old Pip versions:
Create a configuration file named
~/.pip/pip.conf, and add the following contents:
[global] download_cache = ~/.cache/pip
In one command:
printf '[global]\ndownload_cache = ~/.cache/pip\n' >> ~/.pip/pip.conf
You can use a specific environment variable PIP_DOWNLOAD_CACHE and make it point to a directory where your packages will be stored. If they are to be installed again, they will be taken from this directory.
There seems to be also an additional option for PIP
pip --download-cache which ought to do something similar, but I have never tried it myself. For your example, to avoid re-downloading
matplotlib every time, you would do the following:
pip install --download-cache /path/to/pip/cache matplotlib
Does that answer your question?
# download and extract package to build path pip install --no-install matplotlib # the build path could be found by pip install --help|grep Unpack\ packages\ into -A 2 # then rm pip-delete-this-directory.txt inside the build path # this prevent pip from removing package from the build directory after install # you could check the content of the file rm build/pip-delete-this-directory.txt # from now on you could install matplotlib quickly # this uses single build directory # and can speed up compiling by caching intermediate objects. pip install --no-download matplotlib
Also, you could manually download the package
pip install -d dir_for_packages matplotlib
Then install it by un-tar and
python setup install later.
pip install --download-cache works in a similar way w/ extra checking: it firstly search for the latest or specified version of the target package from web, if the search has result and there is cached package in the directory specified by
download-cache, the cached package will be used instead of downloading. For example,
pip install --download-cache . pymongo
will download pymongo package to current directory: