Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replicate virtualenv without downloading all the packages again on the same machine

I have a couple projects that require similar dependencies, and I don't want to have pip going out and DLing the dependencies from the web every time. For instance I am using the norel-django package which would conflict with my standard django (rdbms version) if I installed it system wide.

Is there a way for me to "reuse" the downloaded dependancies using pip? Do I need to DL the source tar.bz2 files and make a folder structure similar to that of a pip archive or something? Any assistance would be appreciated.

Thanks

like image 342
Paul J. Warner Avatar asked Nov 09 '12 15:11

Paul J. Warner


1 Answers

Add the following to $HOME/.pip/pip.conf:

[global]
download_cache = ~/.pip/cache

This tells pip to cache downloads in ~/.pip/cache so it won't need to go out and download them again next time.

like image 101
Zero Piraeus Avatar answered Oct 22 '22 13:10

Zero Piraeus