Coder Social home page Coder Social logo

import gv about python-graph HOT 17 CLOSED

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
import gv

from python-graph.

Comments (17)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
You need to install graphviz and configure your Python path to include the 
bundled
Python module.

http://www.graphviz.org/

Original comment by pmatiello on 17 Dec 2008 at 11:38

  • Changed state: Invalid

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
I have Graphviz2.20 installed for Windows XP but am unsure what the Python 
module is
I should be looking for.  Can you advise?

Original comment by [email protected] on 26 Feb 2009 at 8:01

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
I'm not familiar with Graphviz for Windows, but you probably need to add the 
location
of the module to the import path.

On Linux, I do this:
import sys
sys.path.append('/usr/lib/graphviz/python/')

Replace /usr/lib/graphviz/python/ with the location of the gv module on Windows.

Original comment by pmatiello on 26 Feb 2009 at 9:07

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
hi,

I am facing the same problem with python-graph (graphviz)

when i run example programs i am getting error like this

Traceback (most recent call last):
  File "draw.py", line 11, in <module>
    import gv
ImportError: No module named gv

and my dpkg -l|grep graphviz shows...

graphviz            2.16-3ubuntu2               rich set of graph drawing tools
libgraphviz4        2.16-3ubuntu2               rich set of graph drawing tools
libgv-python        2.16-3ubuntu2               Python bindings for graphviz
python-pygraphviz   0.35.dfsg-1ubuntu1  Python interface to the Graphviz graph 
layout


what is the problem . 
can anybody suggest me how to solve it ?


Thanks in advance.
visu

Original comment by [email protected] on 29 Jun 2009 at 6:06

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
Probably a path problem. Try this before importing the gv module:
import sys
sys.path.append('/usr/lib/graphviz/python/')    # 32-bits
sys.path.append('/usr/lib64/graphviz/python/')  # 63-bits

This is what I do in Fedora. Maybe Ubuntu places the module on na different 
location.

Original comment by pmatiello on 30 Jun 2009 at 1:26

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
hi,
thanks for your reply.
i don't have any any files in the specified path(/usr/lib/graphviz/python/ or
/usr/lib64/graphviz/python/)
but my dpkg -l shows graphviz installed.
can you plz send me some solution

Thanks 
visu

Original comment by [email protected] on 5 Jul 2009 at 10:57

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
You can create .dot files and then use the command-line tools distributed with
graphviz to draw the images.

Original comment by pmatiello on 5 Jul 2009 at 3:55

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
To make it work at Ubuntu 9.10 (after installing graphviz, python-graph, 
libgv-python
and python-pygraphviz) it was necessary this ugly substitution for the "_gv.so" 
library:

sudo su
cd /usr/lib/pyshared/python2.6 mv _gv.so _gv.so-
ln -s libgv_python.so _gv.so

Than you have to use: sys.path.append('/usr/lib/pyshared/python2.6')

Original comment by [email protected] on 20 Feb 2010 at 10:35

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
[deleted comment]

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
It appears that graphviz for windows has no python bindings, or they are not 
included with the installer, and not available elsewhere.

Furthermore, I can find no mention of libgv-python (the library which gv is 
from, I 
think) *ever* being available on windows.

Has this library ever actually been tested on windows?

Original comment by [email protected] on 26 Mar 2010 at 5:55

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
@nagini, thank you. Your solution works. Although I could not get it working on 
64 bit one. may be its ubuntu 10.04 or 64 bit.

Original comment by [email protected] on 15 Jun 2010 at 6:41

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
I have the same problem on Windows XP...did anyone get a chance to fix this 
issue?

Original comment by [email protected] on 30 Jun 2010 at 12:15

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
Has anybodu an answer ? I would like to use it on Windows too...

Original comment by [email protected] on 7 Apr 2011 at 7:36

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
I've already done what Nagini said, but i've got:


  File "/usr/lib/pymodules/python2.6/gv.py", line 25, in <module>
    _gv = swig_import_helper()
  File "/usr/lib/pymodules/python2.6/gv.py", line 17, in swig_import_helper
    import _gv
ImportError: No module named _gv

I don't see any _gv in "/usr/lib/pymodules/python2.6/" Any suggestion?

Original comment by [email protected] on 31 May 2011 at 2:34

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
I know what's the problem... i should use: sudo ln -s libgv_python.so _gv.so

Original comment by [email protected] on 31 May 2011 at 2:42

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
[deleted comment]

from python-graph.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
Can't get this to work on OS X Snow Leopard. Have built graphviz from scratch, 
have intalled py??-pygraphviz packages via MacPort and I still can't neither 
get python to find the gv module nor find the _gv.so library.

Original comment by [email protected] on 14 Jun 2012 at 6:27

from python-graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.