1

I have a project running on CentOS7 that uses Numpy. The problem is that it takes a very huge amount of time to install this dependency.

I therefore tried to yum install numpy libs before pip install it.

So I run:

yum install numpy-1.7.1
pip install numpy==1.7.1   # This pip is executed in a virtualenv

The yum install installs the packaged library, and is quite fast to be performed. The weird thing is that the pip install command re-compile all the sources. This is strange because, from my understanding, the pip install shall only add the python bindings on the compiled lib previously installed.

Any idea to get this library installed without to have everything recompiled?

2
  • To be clear, after using the package manager to install numpy to the system (yum install numpy) you can't import numpy in a python shell? To my understanding, the second step, pip install should be unnecessary. Have you tried starting the python interpreter in importing numpy? Commented Aug 31, 2016 at 14:43
  • Indeed the yum install install the package globally. But I need to install it into a virtual env, that's why I run the pip install Commented Aug 31, 2016 at 16:10

1 Answer 1

1

I solved it by symlinking the 'global lib' (installed by yum install) into the virtual env:

ln -s /lib64/python2.7/site-packages/numpy $VENV/lib64/python2.7/site-packages/numpy
ln -s /lib64/python2.7/site-packages/numpy-1.7.1-py2.7.egg-info $ENV/lib64/python2.7/site-packages/numpy-1.7.1-py2.7.egg-info
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.