0

I am trying to install the SciPy package on Red Hat Enterprise Linux Server release 6.3. However, it is failing.

The version of Python I am using is 2.6, however it seems to require 2.4. Is there another version of SciPy that is compatible with 2.6? If 2.4 is required, any suggestions on how to get that? I followed the directions on the python webpage but they seem to be out of date. It also requires f2py, which I am unsure of how to get.

Any suggestions for easier installation? I had been following the instructions here.

Thanks!

dda
  • 6,030
  • 2
  • 25
  • 34
user1253952
  • 1,577
  • 8
  • 22
  • 34
  • Did you install [Numpy](http://numpy.org/) first? On red-Hat compatible systems (Fedora and CentOS) you can install it via `yum`: `sudo yum install scipy` will install scipy with all dependencies. – Andrey Sobolev Oct 09 '12 at 08:57
  • Numpy is installed (at least I'm able to "import numpy" while running python and that works fine). Running either 'sudo yum install python-scipy.x86_64' or 'sudo yum install python-scipy-devel.x86_64' errors because: Error: Package: python-scipy-0.6.0-6.2.x86_64 (science_ScientificLinux) Requires: python(abi) = 2.4 – user1253952 Oct 09 '12 at 18:11
  • scipy 0.6 is very old. The latest version is 0.11, released 25 Sept 2012. – Warren Weckesser Oct 11 '12 at 01:06
  • @WarrenWeckesser thanks, didn't realize that version was so far behind. Even trying to download a newer version seems to have issues because the f2py module isn't installed. Do you know any way to avoid this? Why is f2py not automatically fetched with the download? – user1253952 Oct 11 '12 at 01:35
  • f2py is included with numpy, but I don't know how yum handles its installation. By the way, what version of numpy do you have? (Check numpy.__version__) The latest release is 1.6.2. – Warren Weckesser Oct 11 '12 at 01:52
  • 1.4.1. Removing and re-installing numpy with yum still left me with the same version. – user1253952 Oct 11 '12 at 02:22
  • Built the new version of numpy from source, and was able to install scipy through the version I had downloaded. Thanks so much! – user1253952 Oct 11 '12 at 02:56

3 Answers3

2

Enable the EPEL repository: https://fedoraproject.org/wiki/EPEL

After that, just "yum install scipy"

janneb
  • 36,249
  • 2
  • 81
  • 97
  • Still getting an error. Error: Package: scipy-0.7.2-5.el6.x86_64 (epel) Requires: f2py I believe I shouldn't have to install f2py since it should have come with my numpy installation? Installed f2py anyway. However, running 'f2py' on the command line produces a syntax error so I'm guessing that that didn't install correctly. – user1253952 Oct 09 '12 at 21:08
2

I was able to solve this problem by downloading the latest version of NumPy (building and installing that from the source since the one on the Red Hat package manager was a couple versions outdated), then installing scipy (via the setup.py scipy file I had downloaded).

user1253952
  • 1,577
  • 8
  • 22
  • 34
0

A problem I ran into when installing SciPy from setup.py on RHEL 5 was undefined _gfortran symbols.

I found out this is due to a mismatch in the FORTRAN compiler used -- I had used the gfortran compiler to build the ATLAS/BLAS libraries but was using the g77 compiler to build SciPy

If you have this problem, fix it by specifying the FORTRAN version to use with setup. In my case, to use the gfortran compiler:

python setup.py build --fcompiler=gnu95 --force

The --force flag was necessary to correct the build with the wrong compiler.

To list your FORTRAN compilers available use:

python setup.py build --help-fcompiler

After that,

python setup.py install

as usual.

Jesuisme
  • 1,805
  • 1
  • 31
  • 41