infomap dependency error when importing algorithms
See original GitHub issueDescribe the bug
I’m having problems import algorithms, it seems to be because of a problem with the infomap
dependency.
(personal info X’d out)
>>> from cdlib import algorithms
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "XXX/miniconda3/envs/XXX/lib/python3.8/site-packages/cdlib/algorithms/__init__.py", line 2, in <module>
from .crisp_partition import *
File "XXX/miniconda3/envs/XXX/lib/python3.8/site-packages/cdlib/algorithms/crisp_partition.py", line 2, in <module>
import infomap as imp
File "XXX/miniconda3/envs/XXX/lib/python3.8/site-packages/infomap.py", line 34, in <module>
import _infomap
ImportError: dlopen(XXX/miniconda3/envs/XXX/lib/python3.8/site-packages/_infomap.cpython-38-darwin.so, 2): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
Referenced from: XXX/miniconda3/envs/XXX/lib/python3.8/site-packages/_infomap.cpython-38-darwin.so
Reason: image not found
To Reproduce Steps to reproduce the behavior:
- CDlib version: 0.2.3
- Operating System: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.10
Expected behavior Algorithms to be able to be imported without error.
Additional context
from cdlib import ensemble
works correctly.
I get issue #181 for cdlib==0.2.0 and cdlib==0.2.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[Requirements] Dependency breaking change in evaluation ...
Describe the bug After pip installing the package, when importing omega_index_py3 dependency path breaks the import.
Read more >python - how to use infomap community detection using cdlib
from cdlib import algorithms import networkx as nx G = nx.karate_club_graph() coms = algorithms.infomap(G). but I got this error message:
Read more >@mapequation/infomap - npm
Infomap. This is Infomap compiled as a web worker with Emscripten. Infomap is a network clustering algorithm based on the Map equation.
Read more >Table dependency error when importing managed solution
Solved: We are currently building an app for and in this app we have created a new business process flow (Recruitment Opportunity Process)....
Read more >Community detection algorithm | Kaggle
This behaviour is the source of the following dependency conflicts. explainable-ai-sdk 1.3.2 requires ... import networkx as nx from cdlib import algorithms.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hurray 🎉 that made it work. Thank you for your help @GiulioRossetti !
Just for clarity I installed it with:
It seems related to a broken installation o f the Infomap dependency. Have you installed cdlib using pip or anaconda? Is this issue common to both installation methodologies (starting from clean python envs)?
Tbh I haven’t tried so far to install Infomap on osx so I don’t know if this is a known issue.