[Numpy-discussion] Minimal NumPy for distribution

Frédéric Bastien nouiz at nouiz.org
Wed Sep 4 13:49:49 EDT 2013


Hi,

I have done some exploratory work with Theano to generate a shared library
from a Theano function. This link with numpy c api. If we want to
distribute this library and call it from C and/or python, what is the
minimal installed part of NumPy needed? I suppose that only the c api is
needed. Do someone already checked that?

>From what I found on linux, numpy linked with a dynamic BLAS take 13MB.
There is 2.7MB from .so, 5.3MB from .py and 3.8MB from .pyc. Can we just
keep all .so and remove all .py and .pyc file? I suppose we need to modify
the __init__.py file too.

On Windows, with the unofficial 64 bit binary of NumPy linked with MKL, the
numpy directory take 56MB. So I would also like to know witch shared
library(dll) is needed. Here is the .so file found on linux:

/lib/python2.7/site-packages/numpy/core/multiarray_tests.so
/lib/python2.7/site-packages/numpy/core/multiarray.so
/lib/python2.7/site-packages/numpy/core/_dotblas.so
/lib/python2.7/site-packages/numpy/core/_sort.so
/lib/python2.7/site-packages/numpy/core/scalarmath.so
/lib/python2.7/site-packages/numpy/core/umath_tests.so
/lib/python2.7/site-packages/numpy/core/umath.so
/lib/python2.7/site-packages/numpy/numarray/_capi.so
/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so
/lib/python2.7/site-packages/numpy/random/mtrand.so
/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so
/lib/python2.7/site-packages/numpy/lib/_compiled_base.so

Can I get rid of all shared lib outside of core?

thanks

Frédéric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130904/3aa7a15f/attachment.html>


More information about the NumPy-Discussion mailing list