They should come pre-compiled with Centos OS, so try with:
sudo yum install numpy scipy
.
So you have two option fist one is installing it system wide, like I mentioned they are pre-compiled with Centos OS, so you can Install the complete scipy
packages with numpy
like this:
sudo yum install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
Or you can use pip for the installation, like this:
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
Please read the official docs from scipy organization on how to install all the packages on you system.
NOTE:
You are right that system wide installation will install it only for python2.7
, so to use it for python3.5
you will install via pip
, so do this:
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
and I suggest that you install all of this packages, after the installation I've opened my terminal and I've did this:
copser@copser-LIFEBOOK-S751:~$ python3.5
Python 3.5.2 (default, Sep 14 2017, 22:51:06)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import numpy as np
>>> import numpy.f2py as myf2py
>>>
as you can see I've imported numpy inside python3.5.2
and it is working, I'm using Ubuntu 16.04
it should be the same on Centos OS.