其他分享
首页 > 其他分享> > ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

作者:互联网

安装OpenBLAS的步骤

 

(1)下载最新的openblas

           git clone https://github.com/xianyi/OpenBLAS.git

(没有安装git,先安装git 。CentOS安装git

            yum install git  /  apt install git

(2)打开 OpenBLAS

            cd OpenBLAS

(3)(如果没有安装gfortran,执行sudo apt-get install gfortran) (centos是yum install gcc-gfortran)

            make FC=gfortran

(4)将OpenBLAS安装到/opt下

            make install

(5)执行以下命令完成安装

            ln -s /opt/OpenBLAS/lib/libopenblas.so  /usr/lib/libblas.so.3

            ln -s /opt/OpenBLAS/lib/liblapack.so.3 /usr/lib/liblapack.so.3

(6)在~/.bashrc中加入

            export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/OpenBLAS/lib

            source ~/.bashrc

标签:opt,git,install,lib,No,ImportError,file,gfortran,OpenBLAS
来源: https://blog.csdn.net/jiaoo/article/details/96993537