Você está usando o python fornecido pela Apple, não aquele instalado via macports
Use sudo port select python ,python-version>
para colocar o link no python correto em / opt / local / bin / python
Estou tentando fazer com que os modelos gráficos funcionem (do django extensões de comando) no Snow Leopard. Requer pygraphviz, que eu instalei via macports. Após a instalação bem-sucedida, estou recebendo este erro:
>>> import pygrahphviz
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pygrahphviz
>>> import pygraphviz
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/__init__.py", line 54, in <module>
from agraph import AGraph, Node, Edge, Attribute, ItemAttribute
File "/Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/agraph.py", line 19, in <module>
import graphviz as gv
File "/Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/graphviz.py", line 7, in <module>
import _graphviz
ImportError: dlopen(/Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/_graphviz.so, 2): Symbol not found: _Agdirected
Referenced from: /Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/_graphviz.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/pygraphviz-1.1-py2.6-macosx-10.6-universal.egg/pygraphviz/_graphviz.so
>>>
Alguma sugestão?
Você está usando o python fornecido pela Apple, não aquele instalado via macports
Use sudo port select python ,python-version>
para colocar o link no python correto em / opt / local / bin / python