Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Speedup virtualenv creation with numpy and pandas

I have multiple virtualenvs on a single machine, but all of them need numpy and pandas. I want to have seperated copies for each virtualenv, but creation of those virtualenvs takes quite some time. Is there some well defined way to precompile numpy and pandas on my machine just once and then to do something like:

pip install my_precompiled_numpy 
like image 370
Achim Avatar asked Aug 05 '13 20:08

Achim


1 Answers

You could make use of the wheel package. We do this over at pandas for our continuous integration builds so that we can basically download them and install them extremely fast.

Take a look at ci/speedpack/build.sh. This script essentially builds a bunch of wheels that we use (numpy and scipy included) for CI. They are actually stored on server and then pulled from there when travis-ci runs.

Take a look at ci/install.sh to see how the installation process works.

In your situation a server might be overkill, but you could setup a local repo and install wheels from there.

like image 188
Phillip Cloud Avatar answered Nov 15 '22 22:11

Phillip Cloud