简体   繁体   English

在Red Hat上安装SciPy

[英]Installing SciPy on Red Hat

I am trying to install the SciPy package on Red Hat Enterprise Linux Server release 6.3. 我正在尝试在Red Hat Enterprise Linux Server 6.3版上安装SciPy软件包。 However, it is failing. 但是,它失败了。

The version of Python I am using is 2.6, however it seems to require 2.4. 我使用的Python版本是2.6,但是似乎需要2.4。 Is there another version of SciPy that is compatible with 2.6? 是否有与2.6兼容的SciPy的另一个版本? If 2.4 is required, any suggestions on how to get that? 如果需要2.4,如何获得该建议? I followed the directions on the python webpage but they seem to be out of date. 我按照python网页上指示进行操作,但是它们似乎已经过时了。 It also requires f2py, which I am unsure of how to get. 它还需要f2py,我不确定该如何获取。

Any suggestions for easier installation? 有什么建议可以简化安装? I had been following the instructions here . 我一直在遵循这里的指示。

Thanks! 谢谢!

Enable the EPEL repository: https://fedoraproject.org/wiki/EPEL 启用EPEL储存库: https : //fedoraproject.org/wiki/EPEL

After that, just "yum install scipy" 之后,只需“ yum install scipy”

我能够通过下载最新版本的NumPy(从源代码构建并安装该版本,因为Red Hat软件包管理器上的版本已经过时)来解决此问题,然后安装scipy(通过setup.py scipy文件我已下载)。

A problem I ran into when installing SciPy from setup.py on RHEL 5 was undefined _gfortran symbols. 在RHEL 5上从setup.py安装SciPy时遇到的问题是未定义的_gfortran符号。

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 我发现这是由于所使用的FORTRAN编译器不匹配造成的-我曾使用gfortran编译器来构建ATLAS / BLAS库,但是正在使用g77编译器来构建SciPy

If you have this problem, fix it by specifying the FORTRAN version to use with setup. 如果您有此问题,请通过指定要与安装程序一起使用的FORTRAN版本来修复它。 In my case, to use the gfortran compiler: 就我而言,要使用gfortran编译器:

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

The --force flag was necessary to correct the build with the wrong compiler. --force标志对于使用错误的编译器更正构建是必要的。

To list your FORTRAN compilers available use: 要列出可用的FORTRAN编译器,请使用:

python setup.py build --help-fcompiler

After that, 之后,

python setup.py install

as usual. 照常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM