Kitware / paraviewweb

Web framework for building interactive visualization relying on VTK or ParaView to produce visualization data
http://kitware.github.io/paraviewweb/
BSD 3-Clause "New" or "Revised" License
160 stars 50 forks source link

pvpython : ImportError: libgfortran.so.4 #515

Open skoudoro opened 4 years ago

skoudoro commented 4 years ago

Hi Paraview Team.

I am using kitware/paraview:pvw-v5.7.1-egl-py3 docker image. If your server.py tries to do this following import from scipy.ndimage import map_coordinates you got the following error:

  File "/usr/local/lib/python3.6/dist-packages/fury/utils.py", line 5, in <module>
    from scipy.ndimage import map_coordinates
  File "/opt/paraview/lib/python3.6/site-packages/scipy/ndimage/__init__.py", line 161, in <module>
    from .filters import *
  File "/opt/paraview/lib/python3.6/site-packages/scipy/ndimage/filters.py", line 38, in <module>
    from . import _ni_docstrings
  File "/opt/paraview/lib/python3.6/site-packages/scipy/ndimage/_ni_docstrings.py", line 4, in <module>
    from scipy.misc import doccer
  File "/opt/paraview/lib/python3.6/site-packages/scipy/misc/__init__.py", line 68, in <module>
    from scipy.interpolate._pade import pade as _pade
  File "/opt/paraview/lib/python3.6/site-packages/scipy/interpolate/__init__.py", line 175, in <module>
    from .interpolate import *
  File "/opt/paraview/lib/python3.6/site-packages/scipy/interpolate/interpolate.py", line 20, in <module>
    import scipy.linalg
  File "/opt/paraview/lib/python3.6/site-packages/scipy/linalg/__init__.py", line 190, in <module>
    from .misc import *
  File "/opt/paraview/lib/python3.6/site-packages/scipy/linalg/misc.py", line 5, in <module>
    from .blas import get_blas_funcs
  File "/opt/paraview/lib/python3.6/site-packages/scipy/linalg/blas.py", line 214, in <module>
    from scipy.linalg import _fblas
ImportError: libgfortran.so.4: cannot open shared object file: No such file or directory

To fix this issue temporarily I just renamed /opt/paraview/lib/python3.6/site-packages/scipy to /opt/paraview/lib/python3.6/site-packages/buggy_scipy and installed a new version via pip3.

scottwittenburg commented 4 years ago

Thanks for reporting this @skoudoro. I see we're using the paraview superbuild to build and install some python packages like matplotlib and scipy (see here), but maybe we should install those in the system python within the container instead. Then we could update this section with a --upgrade, so if you put scipy in requirements.txt in the /pvw mounted directory, it would install the latest version when the container starts, I think solving the problem you discovered.