Lightweight-Python-Wrappers icon indicating copy to clipboard operation
Lightweight-Python-Wrappers copied to clipboard

PIP uses the cache by default if available

Open peardox opened this issue 3 years ago • 0 comments

This can be undesirable, particularly when testing

I've managed to bodge in some hacky progress indication for my project so this is the first time I've spotted this anomoly.

I just noticed Torch was taking 50 seconds to install on my dev Laptop while a more reasonable figure is about 6+ mins (376s on testing)

There are two stages to a PIP install, aquisition and delpoyment. If the package is already in the cache then there's very little to do in the aquisition stage as the package's whl file is already in the cache.

While it's actually beneficial it's worth pointing out that if you have the same packages installed on System Python as you're trying to install for an Embedded Python then install times will be misleading when testing unless you 'pip cache purge' before running an application.

Hmm - wonder what happens if you put a fake package in the cache?

peardox avatar Jul 23 '22 06:07 peardox