filmov
tv
Python pip install from local cache
![preview_player](https://i.ytimg.com/vi/ePeCss6Zzlo/maxresdefault.jpg)
Показать описание
Python pip install from local cache
1)
Enable download_cache for pip.
[global]
download_cache = ~/.cache/pip
2)
Install a package
#pip install six
* Add the package "six" to cache and install
3)
Check the files in the cache
#ls -lsh ~/.cache/pip/
4)
Install the same package again and you can see that it takes from the cache
#pip install six
* Get the package "six" from cache and install
5)
You can also manually add packages to pip cache
a)
b)
c)
Modify the name
Replace "/" with %2F
Repalce ":" with %3A
d)
Create another file with above name and extension ".content-type" and add the content "application/octet-stream".
Example:
application/octet-stream
1)
Enable download_cache for pip.
[global]
download_cache = ~/.cache/pip
2)
Install a package
#pip install six
* Add the package "six" to cache and install
3)
Check the files in the cache
#ls -lsh ~/.cache/pip/
4)
Install the same package again and you can see that it takes from the cache
#pip install six
* Get the package "six" from cache and install
5)
You can also manually add packages to pip cache
a)
b)
c)
Modify the name
Replace "/" with %2F
Repalce ":" with %3A
d)
Create another file with above name and extension ".content-type" and add the content "application/octet-stream".
Example:
application/octet-stream