What is gv import in python?

I installed easy_installunder the windows and installed pygraph, but the commad import gvin the example taken from here is not working:

What is gv lib? what import gvdoes

I get this error:

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

All other import work fine

+5
source share
5 answers

This can have several sources of problems:

  • During installation, something went wrong and the module cannot be installed.
  • You did not install Python Path correctly .
  • @Second example: the pygraph.readwrite module may exist, but it is possible that it did not receive a submodule called a dot.

Of course, there are other possible problems, but I think that would be most likely.

: . , .

.

+1

libgv-python . Ubuntu:

sudo apt-get install libgv-python
+4

, -, python-graph, . http://code.google.com/p/python-graph/issues/detail?id=15. gv - GraphViz, , , - . , sys.path, Windows.

+1

python-graph " 15: gv" :

, graphviz Windows python, , .

, libgv-python (, gv is, ) - .

gv.py .

, , :

sys.path.append('..')
sys.path.append('/usr/lib/graphviz/python/')
sys.path.append('/usr/lib64/graphviz/python/')
import gv

:

gvv = gv.readstring(dot)
gv.layout(gvv,'dot')
gv.render(gvv,'png','europe.png')

, , dot.exe , PATH:

f = open('europe.dot', 'a')
f.write(dot)
f.close()
import os
command = '"C:\\Program Files\\Graphviz 2.28\\bin\\dot.exe" -Tpng europe.dot > europe.png'
print command
os.system(command)
os.system('europe.png')
+1

gv, graphviz-python. python .: http://www.graphviz.org/Home.php

0

All Articles