Further installation issues: avoiding X Windows

5 views
Skip to first unread message

dartar

unread,
Jul 21, 2009, 7:32:18 AM7/21/09
to networkx-discuss
I have finally managed to install pygraphviz (thanks Aric for the kind
reply, we crossed email!).
However my networkx installation still has some glitches.

If I use networkx in python interactive mode (line by line) it works
fine: I can import a graph from an adjacency list file, set my
preferred layout and draw it. However if I run the same instructions
as a .py file from a Terminal.app window, an X Windows session is
opened and the terminal hangs without producing any output, even for
trivial cases of very small graphs. My other python scripts work fine
from the Terminal.

Does any of you have a clue what could possibly cause this behaviour?

My setup:

Mac OS 10.5.7
python 2.5 (bundled)
networkx 0.99
graphviz 2.24.0
pygraphviz 0.99.1

Best,
Dario

Aric Hagberg

unread,
Jul 21, 2009, 9:06:21 AM7/21/09
to networkx...@googlegroups.com

It sounds like maybe the problem is with matplotlib?
Can you produce a test plot with matplotlib:
$ python -c "import pylab; pylab.plot([1,2,3]); pylab.show()"

Aric

dartar

unread,
Jul 21, 2009, 9:41:25 AM7/21/09
to networkx-discuss
> It sounds like maybe the problem is with matplotlib?
> Can you produce a test plot with matplotlib:
> $ python -c "import pylab; pylab.plot([1,2,3]); pylab.show()"

It works and I found the culprit - I was omitting #!/usr/bin/python in
my test scripts.

Dario
Reply all
Reply to author
Forward
0 new messages