Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python does not see pygraphviz

I have installed pygraphviz using easy_install But when i launch python i have an error:

>>>import pygraphviz as pgv Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pygraphviz >>>  

Using Ubuntu 12.04 and gnome-terminal.

like image 202
Sashko Lykhenko Avatar asked Mar 27 '13 14:03

Sashko Lykhenko


People also ask

How do I install pip?

Step 1: Download the get-pip.py (https://bootstrap.pypa.io/get-pip.py) file and store it in the same directory as python is installed. Step 2: Change the current path of the directory in the command line to the path of the directory where the above file exists. Step 4: Now wait through the installation process. Voila!


1 Answers

Assuming that you're on Ubuntu please look at following steps

  1. sudo apt-get install graphviz libgraphviz-dev pkg-config
  2. Create and activate virtualenv if needed. The commands looks something like sudo apt-get install python-pip python-virtualenv
  3. Run pip install pygraphviz
  4. Run terminal and check by importing and see if it works
like image 142
Sidharth Shah Avatar answered Sep 20 '22 23:09

Sidharth Shah