1

I was able (after a bit of a struggle) to install networkit via pip install networkit in a python3.6 anaconda environment (I'm on Mac OSX high sierra). In order for networkit to work I had to install a g++ compiler which supports OpenMp, so I chose to brew install gcc. Installation went fine but when importing the module I get the error

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-0547b3a80fd8> in <module>()
----> 1 import networkit

//anaconda/envs/py36/lib/python3.6/site-packages/networkit/__init__.py in <module>()
     41 # local imports
     42 from . import stopwatch
---> 43 from . import graph
     44 from . import graphio
     45 from . import community

//anaconda/envs/py36/lib/python3.6/site-packages/networkit/graph.py in <module>()
      1 # extension imports
----> 2 from _NetworKit import Graph, SpanningForest, GraphTools, RandomMaximumSpanningForest, UnionMaximumSpanningForest

ImportError: dlopen(//anaconda/envs/py36/lib/python3.6/site-packages/_NetworKit.cpython-36m-darwin.so, 2): Symbol not found: _GOMP_parallel
  Referenced from: //anaconda/envs/py36/lib/python3.6/site-packages/_NetworKit.cpython-36m-darwin.so
  Expected in: flat namespace
 in //anaconda/envs/py36/lib/python3.6/site-packages/_NetworKit.cpython-36m-darwin.so

which I think depends on the fact that I am not using the Homebrew gcc but the default Apple Clang which does not support OpenMP. My question is: how can I set g++-7 to be the default compiler so that I get my networkit module up and running?

sato
  • 609
  • 5
  • 21
  • https://stackoverflow.com/a/50933711/2005352 – Alex Jun 19 '18 at 17:16
  • Possible duplicate of [Error while uploading Networkit python module with Jupyter notebook](https://stackoverflow.com/questions/49012764/error-while-uploading-networkit-python-module-with-jupyter-notebook) – Alex Jun 19 '18 at 17:16

0 Answers0