Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install pygraphviz under Ubuntu 10.04 in order to use it within my Django projects.

I used synaptic and it was installed without any problem.

I also installed django-extensions with synaptic (django-extensions has a tool that uses pygraphviz and this is the one that I need)

Now when I try to use django-extensions with pygraphviz

$ python graph_models -a -g -o model.png

I'm getting an

Error: need pygraphviz python module ( apt-get install python-pygraphviz )

How can I fix this ?

share|improve this question
up vote 1 down vote accepted

Your script seems to be unable to find pygraphviz module. To fix that, you should make sure that pygraphviz is in your Python's sys.path.

In case you find out the module is not installed, you have alternative ways of installing it:

  • sudo apt-get install python-pygraphviz (as suggested by the error message),
  • sudo pip install pygraphviz (using pip - Python package installer, I really recommend it),
share|improve this answer
sudo pip install pygraphviz fails because the graphviz package is a requirement. The only way to get this installed on Ubuntu in one go is with the first option: sudo apt-get install python-pygraphviz . – Luís de Sousa Jul 29 '15 at 9:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .