Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been trying to install numpy with yum (instructions here), and the tar.gz file (instructions here), but with no positive result.

yum gives me this output:

$ sudo yum install python-numpy python-scipy
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * epel: mirrors.cat.pdx.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package python-numpy.x86_64 0:1.6.1-15.1 will be installed
--> Processing Dependency: python(abi) = 2.4 for package: python-numpy-1.6.1-15.1.x86_64
--> Processing Dependency: libgfortran.so.1()(64bit) for package: python-numpy-1.6.1-15.1.x86_64
--> Processing Dependency: libblas.so.3()(64bit) for package: python-numpy-1.6.1-15.1.x86_64
---> Package python-scipy.x86_64 0:0.6.0-6.2 will be installed
--> Processing Dependency: python(abi) = 2.4 for package: python-scipy-0.6.0-6.2.x86_64
--> Processing Dependency: libfftw3.so.3()(64bit) for package: python-scipy-0.6.0-6.2.x86_64
--> Running transaction check
---> Package compat-libgfortran-41.x86_64 0:4.1.2-39.el6 will be installed
---> Package fftw.x86_64 0:3.2.1-3.1.el6 will be installed
---> Package libblas3.x86_64 0:3.3.1-10.1 will be installed
---> Package python-numpy.x86_64 0:1.6.1-15.1 will be installed
--> Processing Dependency: python(abi) = 2.4 for package: python-numpy-1.6.1-15.1.x86_64
---> Package python-scipy.x86_64 0:0.6.0-6.2 will be installed
--> Processing Dependency: python(abi) = 2.4 for package: python-scipy-0.6.0-6.2.x86_64
--> Finished Dependency Resolution
Error: Package: python-numpy-1.6.1-15.1.x86_64 (science_ScientificLinux)
           Requires: python(abi) = 2.4
           Installed: python-2.6.6-29.el6_2.2.x86_64 (@updates)
               python(abi) = 2.6
           Available: python-2.6.6-29.el6.i686 (os)
               python(abi) = 2.6
Error: Package: python-scipy-0.6.0-6.2.x86_64 (science_ScientificLinux)
           Requires: python(abi) = 2.4
           Installed: python-2.6.6-29.el6_2.2.x86_64 (@updates)
               python(abi) = 2.6
           Available: python-2.6.6-29.el6.i686 (os)
               python(abi) = 2.6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

For the tar.gz, I do the following: I unpack it in the /usr/local/lib/python2.7/site-packages/ folder. I go in that folder and type

$ sudo python setup.py build
Running from numpy source directory.non-existing path in 'numpy/distutils': 'site.cfg' 
//etc etc
**Could not locate executable g77
**Could not locate executable f77
customize IntelFCompiler
**Could not locate executable ifort
**Could not locate executable ifc
customize LaheyFCompiler
**Could not locate executable lf95
customize PGroupFCompiler
**Could not locate executable pgfortran
customize AbsoftFCompiler
**Could not locate executable f90
customize NAGFCompiler
**Could not locate executable f95
customize VastFCompiler
customize CompaqFCompiler
**Could not locate executable fort
customize IntelItaniumFCompiler
**Could not locate executable efort
**Could not locate executable efc
customize IntelEM64TFCompiler
customize Gnu95FCompiler
**Could not locate executable gfortran
customize G95FCompiler
**Could not locate executable g95
customize PathScaleFCompiler
**Could not locate executable pathf95
**don't know how to compile Fortran code on platform 'posix'
//starred things appear in red
//etc etc
don't know how to compile Fortran code on platform 'posix'
C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC

compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/usr/local/include/python2.7 -c'
gcc: _configtest.c
gcc -pthread _configtest.o -o _configtest
_configtest
failure.
removing: _configtest.c _configtest.o _configtest
building data_files sources
build_src: building npy-pkg config files
running build_py
copying numpy/version.py -> build/lib.linux-x86_64-2.7/numpy
copying build/src.linux-x86_64-2.7/numpy/__config__.py -> build/lib.linux-x86_64-2.7/numpy
copying build/src.linux-x86_64-2.7/numpy/distutils/__config__.py -> build/lib.linux-x86_64-2.7/numpy/distutils
running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
running scons
running build_scripts
  adding 'build/scripts.linux-x86_64-2.7/f2py' to scripts

Afterwards running sudo python setup.py install --prefix=/usr/local or sudo python setup.py install install gives me something similar to the above.

What am I doing wrong? Is there another way to do this?

share|improve this question

migrated from stackoverflow.com Aug 23 '12 at 22:08

This question came from our site for professional and enthusiast programmers.

    
numpy in the yum case seems to require python 2.4 installed, and you have 2.6. –  Joachim Isaksson Aug 23 '12 at 18:15
    
I saw that too, but it doesn't make sense to me. On the instructions page (first link, at the top), under Building From Source, it says that it requires Python 2.6+ . Or are yum and building from source not really related? –  Dana Aug 23 '12 at 18:17
    
Looks like the repositories you're using have some pretty old versions of numpy and scipy (hence compiled for python 2.4). I'd suggest staying away from those versions. Make sure if you have the right repositories or try to install some more up to date ones. –  tiago Aug 23 '12 at 18:47

1 Answer 1

up vote 4 down vote accepted

Make sure you have following RPM installed. Version could be change according your OS version

gcc-gfortran-4.1.2-52.el5_8.1
gcc44-gfortran-4.4.6-3.el5.1
libgfortran.x86_64
lapack.x86_64
blas.x86_64
share|improve this answer
    
sudo yum install gcc-gfortran gcc44-gfortran libgfortran lapack blas python-devel –  xgMz Jun 19 '13 at 16:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.