web-dev-qa-db-ja.com

CentOS 6.264ビットにnumpyをインストールする方法

Yum(instructions here )とtar.gzファイル(instructions here )を使用してnumpyをインストールしようとしましたが、肯定的な結果は得られませんでした。

yumは私にこの出力を与えます:

$ 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

Tar.gzの場合、次のようにします。/usr/local/lib/python2.7/site-packages/フォルダーに解凍します。そのフォルダに移動して入力します

$ 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

その後、Sudo python setup.py install --prefix=/usr/localまたはSudo python setup.py install installを実行すると、上記のようなものが表示されます。

私は何が間違っているのですか?これを行う別の方法はありますか?

3
Dana

次のRPMがインストールされていることを確認してください。 OSのバージョンによってバージョンが変わる可能性があります

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
5
Satish