|
From: | Ahmed Abdeen Hamed |
Subject: | Re: [igraph] igraph visualization |
Date: | Mon, 11 Nov 2013 09:19:55 -0500 |
At least we can be fairly sure now that Cairo is installed properly because igraph actually started plotting something and the error message you see was thrown by the graph drawer routine.Could it be the case that your graph has no vertices at all?
T.I removed all python versions and cairo and installed everything again using HomebrewStill getting errors:>>> plot(g, layout = layout)Traceback (most recent call last):File "<stdin>", line 1, in <module>File "/Library/Python/2.7/site-packages/igraph/drawing/__init__.py", line 437, in plotresult.show()File "/Library/Python/2.7/site-packages/igraph/drawing/__init__.py", line 321, in showself.redraw(ctx)File "/Library/Python/2.7/site-packages/igraph/drawing/__init__.py", line 274, in redrawplotter(ctx, bbox, palette, *args, **kwds)File "/Library/Python/2.7/site-packages/igraph/__init__.py", line 2942, in __plot__drawer.draw(self, palette, *args, **kwds)File "/Library/Python/2.7/site-packages/igraph/drawing/graph.py", line 175, in drawlayout.fit_into(bbox, keep_aspect_ratio=False)File "/Library/Python/2.7/site-packages/igraph/layout.py", line 413, in fit_intomins, maxs = self.boundaries()File "/Library/Python/2.7/site-packages/igraph/layout.py", line 333, in boundariesmins.append(min(col)-border)ValueError: min() arg is an empty sequence>>>Does this look like something you are familiar with?Thanks!-Ahmed
On Sun, Nov 10, 2013 at 7:56 PM, Ahmed Abdeen Hamed <address@hidden> wrote:I am still unable get it to work even though I tried both advice:The path is:PYTHONPATH=/usr/local/lib/python2.7/site-packagesWhen I try which python is still get the following, which is not the path for the brew/usr/bin/pythonHere is what I have in my .bash_loginPATH="${PATH}:/Users/ahamed/bin:/opt/local/bin:/usr/local/lib/python2.7"export PATH="${PATH}:/Users/ahamed/bin:/opt/local/bin"# Setting PATH for EPD_free-7.3-2# The orginal version is saved in .bash_login.pysaveexport PATH=$PATH:/Applications/InfiniteGraph/3.1/binexport PYTHONPATH=/usr/local/lib/python2.7/site-packagesexport ECLIPSE_HOME=/Applications/eclipse/export PATH=$PATH:$ECLIPSE_HOME:$PYTHONPATH### Your previous /Users/ahamedCOM/.bash_login file was backed up as /Users/ahamedCOM/.bash_login.macports-saved_2013-11-08_at_22:21:22##Is there anything fishy here?-AhmedOn Sun, Nov 10, 2013 at 1:25 PM, Tamás Nepusz <address@hidden> wrote:FWIW, I managed to run “brew install py2cairo” without having to install a brew-based Python. I simply added “/usr/local/lib/python2.7/site-packages” on my Python path and it imports the cairo module just fine.This seems to be confirmed by Homebrew’s wiki:“If you have a brewed python, then the bindings are installed for that one. But if you don't have a brewed Python, Homebrew basically just uses the firstpython
(andpython-config
) in yourPATH
. Check that bywhich python
.”So, basically, I think you simply have to add /usr/local/lib/python2.7/site-packages to your PYTHONPATH and you should be fine.—T.
[Prev in Thread] | Current Thread | [Next in Thread] |