ImportError: libgfortran.so.4: cannot open shared object file: No such file or directory

>>> import mglearn
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/study/anaconda3/lib/python3.7/site-packages/mglearn/__init__.py", line 1, in <module>
    from . import plots
  File "/usr/study/anaconda3/lib/python3.7/site-packages/mglearn/plots.py", line 1, in <module>
    from .plot_linear_svc_regularization import plot_linear_svc_regularization
  File "/usr/study/anaconda3/lib/python3.7/site-packages/mglearn/plot_linear_svc_regularization.py", line 3, in <module>
    from sklearn.svm import LinearSVC
  File "/usr/study/anaconda3/lib/python3.7/site-packages/sklearn/__init__.py", line 134, in <module>
    from .base import clone
  File "/usr/study/anaconda3/lib/python3.7/site-packages/sklearn/base.py", line 13, in <module>
    from .utils.fixes import signature
  File "/usr/study/anaconda3/lib/python3.7/site-packages/sklearn/utils/__init__.py", line 10, in <module>
    from .validation import (as_float_array,
  File "/usr/study/anaconda3/lib/python3.7/site-packages/sklearn/utils/validation.py", line 18, in <module>
    from ..utils.fixes import signature
  File "/usr/study/anaconda3/lib/python3.7/site-packages/sklearn/utils/fixes.py", line 144, in <module>
    from scipy.sparse.linalg import lsqr as sparse_lsqr  # noqa
  File "/usr/study/anaconda3/lib/python3.7/site-packages/scipy/sparse/linalg/__init__.py", line 117, in <module>
    from .eigen import *
  File "/usr/study/anaconda3/lib/python3.7/site-packages/scipy/sparse/linalg/eigen/__init__.py", line 11, in <module>
    from .arpack import *
  File "/usr/study/anaconda3/lib/python3.7/site-packages/scipy/sparse/linalg/eigen/arpack/__init__.py", line 22, in <module>
    from .arpack import *
  File "/usr/study/anaconda3/lib/python3.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", line 45, in <module>
    from . import _arpack
ImportError: libgfortran.so.4: cannot open shared object file: No such file or directory

更新scipy

pip uninstall scipy
pip install scipy

即可。

GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐