palash1992 / DynamicGEM

347 stars 81 forks source link

Error when import dynamicTriad #22

Open corwinliu opened 5 years ago

corwinliu commented 5 years ago

I have install the dependencies, and when I run example/example.py, an error occurs as follows:

/Users/corwin/Desktop/project/DynamicGEM/dynamicgem/utils/plot_util.py:6: UserWarning: matplotlib.pyplot as already been imported, this call will have no effect.
  matplotlib.use('Agg')
/Users/corwin/Desktop/project/DynamicGEM/dynamicgem/evaluation/visualize_embedding.py:6: UserWarning: matplotlib.pyplot as already been imported, this call will have no effect.
  matplotlib.use('Agg')
/Users/corwin/Desktop/project/DynamicGEM/dynamicgem/visualization/plot_dynamic_sbm_embedding.py:7: UserWarning: matplotlib.pyplot as already been imported, this call will have no effect.
  matplotlib.use('Agg')
/Users/corwin/Desktop/project/DynamicGEM/dynamicgem/embedding/ae_static.py:9: UserWarning: matplotlib.pyplot as already been imported, this call will have no effect.
  matplotlib.use('Agg')
Using TensorFlow backend.
/Users/corwin/Desktop/project/DynamicGEM/dynamicgem/embedding/dynamicTriad.py:8: UserWarning: matplotlib.pyplot as already been imported, this call will have no effect.
  matplotlib.use('Agg')
Cython not avaiable, falling back to python implemented utils
Err msg: Cython disabled in config
Traceback (most recent call last):
  File "example/example.py", line 17, in <module>
    from dynamicgem.embedding.dynamicTriad import dynamicTriad
  File "/Users/corwin/Desktop/project/DynamicGEM/dynamicgem/embedding/dynamicTriad.py", line 30, in <module>
    import dynamicgem.dynamictriad.core.dataset.dataset_utils as du
  File "/Users/corwin/Desktop/project/DynamicGEM/dynamicgem/dynamictriad/core/dataset/dataset_utils.py", line 4, in <module>
    from dynamicgem.dynamictriad.core import utils, gconv
  File "/Users/corwin/Desktop/project/DynamicGEM/dynamicgem/dynamictriad/core/gconv.py", line 9, in <module>
    mygraph=ctypes.cdll.LoadLibrary(os.path.realpath('')+'/dynamicgem/dynamictriad/core/mygraph.so')
  File "/anaconda3/lib/python3.6/ctypes/__init__.py", line 426, in LoadLibrary
    return self._dlltype(name)
  File "/anaconda3/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/corwin/Desktop/project/DynamicGEM/dynamicgem/dynamictriad/core/mygraph.so, 6): no suitable image found.  Did find:
    /Users/corwin/Desktop/project/DynamicGEM/dynamicgem/dynamictriad/core/mygraph.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03
    /Users/corwin/Desktop/project/DynamicGEM/dynamicgem/dynamictriad/core/mygraph-build/mygraph.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03

Maybe it happened because of the instruction: "Also for compiled c mygraph.so module change the /dynamicGEM/dynamcigem/dynamictriad/core/gconv.py file by replacing with the absolute path of the dynamicGEM folder" in README. And I don't understand what it means.

My platform is macOS Mojave 10.14.3 with python3.6.5 Thank you for your help.

giacomo-domeniconi commented 5 years ago

I have a similar issue. I tried fixing the absolute path of the folder in gconv.py. But when I try to load the file I see:

OSError: dlopen(/Users/gd/eclipse-workspace/DynamicGEM/dynamicgem/dynamictriad/core/mygraph.so, 6): no suitable image found. Did find: /Users/gd/eclipse-workspace/DynamicGEM/dynamicgem/dynamictriad/core/mygraph.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03 /Users/gd/eclipse-workspace/DynamicGEM/dynamicgem/dynamictriad/core/mygraph-build/mygraph.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03

generalfei commented 4 years ago

I meet the same issue. Can you tell me how to solve it? Thanks.