1

我确保已安装 gfortran

[idf@node1 Index]$ sudo yum install gcc-gfortran
Loaded plugins: fastestmirror, langpacks
Repository datastax is listed more than once in the configuration
http://download.opensuse.org/repositories/home%3A/tpokorra%3A/mono/CentOS_CentOS-7/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/

Loading mirror speeds from cached hostfile
 * base: mirror.lug.udel.edu
 * epel: ftp.osuosl.org
 * extras: mirrors.lga7.us.voxel.net
 * updates: centosy3.centos.org
Package gcc-gfortran-4.8.5-4.el7.x86_64 already installed and latest version
Nothing to do
[idf@node1 Index]$

然后我尝试一个python程序,它的导入看起来像这样

import numpy as np
import numpy.random as rnd
from cvxopt import matrix
from cvxopt import blas
from cvxopt import solvers
import time

我收到一个错误

[idf@node1 Index]$ python programusescvxopt.py
Traceback (most recent call last):
  File "IndexReplication.py", line 39, in <module>
    from cvxopt import matrix
  File "/home/idf/anaconda2/lib/python2.7/site-packages/cvxopt/__init__.py", line 32, in <module>
    import cvxopt.base
ImportError: /home/idf/anaconda2/lib/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib64/liblapack.so.3)
[idf@node1 Index]$

编辑 1

[idf@node1 ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-3/root/usr --mandir=/opt/rh/devtoolset-3/root/usr/share/man --infodir=/opt/rh/devtoolset-3/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC) 
[idf@node1 ~]$ 


[idf@node1 ~]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-3/root/usr --mandir=/opt/rh/devtoolset-3/root/usr/share/man --infodir=/opt/rh/devtoolset-3/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC) 
[idf@node1 ~]$ 
4

1 回答 1

0

这有效

conda remove libgfortran
conda install libgcc --force
于 2016-05-10T00:14:36.847 回答