AnacletoLAB / grape

🍇 GRAPE is a Rust/Python Graph Representation Learning library for Predictions and Evaluations
MIT License
508 stars 37 forks source link

ImportError: libgfortran-ed201abd.so.3.0.0: cannot open shared object file: No such file or directory #9

Closed caufieldjh closed 2 years ago

caufieldjh commented 2 years ago

In a fresh notebook, attempting to import grape yields an ImportError about a missing libgfortran-ed201abd.so.3.0.0.

>>> !pip install grape -U
>>> import grape
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.8) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Output exceeds the [size limit](command:workbench.action.openSettings?[). Open the full output data [in a text editor](command:workbench.action.openLargeOutput?276a3afe-1b97-4f33-82e6-6df2db01934a)
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/home/harry/kg-bioportal/data/merged/KG-Bioportal analysis.ipynb Cell 2' in <cell line: 1>()
----> [1](vscode-notebook-cell://wsl%2Bubuntu-20.04/home/harry/kg-bioportal/data/merged/KG-Bioportal%20analysis.ipynb#ch0000001vscode-remote?line=0) import grape

File ~/.local/lib/python3.8/site-packages/grape/__init__.py:9, in <module>
      1 """GraPE main module.
      2 
      3 For now, this is a simple wrapper of GraPE main two sub-modules that for
   (...)
      6 These packages are mimed here by the two sub-directories, ensmallen and embiggen.
      7 """
----> 9 from embiggen import *
     10 from ensmallen import Graph
     13 def import_all(module_locals):

File ~/.local/lib/python3.8/site-packages/embiggen/__init__.py:2, in <module>
      1 """Module with models for graph machine learning and visualization."""
----> 2 from embiggen.visualizations import GraphVisualizer
      3 from embiggen.utils import (
      4     EmbeddingResult,
      5     get_models_dataframe,
   (...)
      9     get_available_models_for_node_embedding,
     10 )
...
    691     'spherical_kn',
    692 ]
    694 from scipy._lib._testutils import PytestTester

ImportError: libgfortran-ed201abd.so.3.0.0: cannot open shared object file: No such file or directory

I've seen that this may be related to libraries packaged with numpy, as seen in the following: https://github.com/ContinuumIO/anaconda-issues/issues/445 https://github.com/numpy/numpy/issues/14348

This may be environment-specific, of course.

LucaCappelletti94 commented 2 years ago

What is your numpy, scipy and sklearn libraries versions?

caufieldjh commented 2 years ago

numpy==1.22.4 scipy==1.8.1 scikit-learn==1.1.1

caufieldjh commented 2 years ago

I've noticed that this appears to be specific to notebooks run in VSCode - running notebooks in the browser NotebookApp do not appear to raise this error when importing grape. Could be a permissions or PYTHONPATH issue specific to VSCode.

LucaCappelletti94 commented 2 years ago

I'm loving VSCode more every day.

LucaCappelletti94 commented 2 years ago

Ok so, this error comes from sklearn but I currently need sklearn other than when using the models, which I could wrap, also for a number of features in the visualization. The only thing I could add here could be a more informative error than the one that Python provides, though I am still not sure about how to fix this.

caufieldjh commented 2 years ago

Because this appears to be specific to notebooks in VSCode and originates in a different library, I can close the issue.