user10560259
user10560259

Reputation: 21

Graph-tool installed, Import.all does not work

I have installed graph-tool:

brew --prefix graph-tool
'/usr/local/opt/graph-tool

but when trying to import it:

Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin Type "help", "copyright", "credits" or "license" for more information.

>>> from graph_tool.all import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'graph_tool'

:(

Does anyone have a solution for this?

Thanks

Upvotes: 2

Views: 1479

Answers (1)

Tiago Peixoto
Tiago Peixoto

Reputation: 5261

Homebrew installs the library using its own Python interpreter, which has its module path somewhere in /usr/local/opt/. You are using the anaconda Python interpreter, which knows nothing about homebrew-installed modules. The solution here is simply to use homebrew's Python interpreter, not anaconda's.

Upvotes: 1

Related Questions