I uninstalled everything and I installed python using the brew version, then installed cairo using brew as well. Now it is finally working!
Thanks very much, -Ahmed On Tue, May 6, 2014 at 10:07 AM, Ahmed Abdeen Hamed <[email protected] > wrote: > I got to work with Enthought version of Python but it is unable to see > Cairo again, but cairo is already installed. Here is the error: > > >>> plot(g, layout = layout) > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File > "/Users/ahamed/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/igraph/drawing/__init__.py", > line 458, in plot > > result = Plot(target, bbox, background="white") > > File > "/Users/ahamed/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/igraph/drawing/__init__.py", > line 129, in __init__ > > self._surface_was_created = not isinstance(target, cairo.Surface) > > File > "/Users/ahamed/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/igraph/drawing/utils.py", > line 396, in __getattr__ > > raise TypeError("plotting not available") > > TypeError: plotting not available > > > On Mon, May 5, 2014 at 4:53 PM, Ahmed Abdeen Hamed < > [email protected]> wrote: > >> It is the homebrew: >> >> which python >> >> /usr/local/bin/pip >> >> -Ahmed >> >> >> >> >> On Mon, May 5, 2014 at 4:49 PM, Tamás Nepusz <[email protected]> wrote: >> >>> Which pip is this, again? Are you using pip from Homebrew’s Python or >>> from the system Python? >>> >>> -- >>> T. >>> >>> ------------------------------------------------------ >>> From: Ahmed Abdeen Hamed [email protected] >>> Reply: [email protected] [email protected], Help for igraph >>> users [email protected] >>> Date: 5 May 2014 at 22:43:15 >>> To: Help for igraph users [email protected] >>> Subject: Re: [igraph] igraph visualization >>> >>> > I removed the previous version of igraph and installed a new one using >>> > >>> > pip install python-igraph >>> > >>> > Still getting the same error. >>> > >>> > Any other suggestions? >>> > >>> > -Ahmed >>> > >>> > >>> > On Mon, May 5, 2014 at 4:25 PM, Tamás Nepusz wrote: >>> > >>> > > Have you compiled igraph with Homebrew’s Python or with the system >>> Python? >>> > > The version compiled with the system Python won’t work with >>> Homebrew’s >>> > > Python and vice versa. >>> > > >>> > > -- >>> > > T. >>> > > >>> > > ------------------------------------------------------ >>> > > From: Ahmed Abdeen Hamed [email protected] >>> > > Reply: [email protected] [email protected] >>> > > Date: 5 May 2014 at 22:07:41 >>> > > To: Tamás Nepusz [email protected] >>> > > Cc: Help for igraph users [email protected] >>> > > Subject: Re: [igraph] igraph visualization >>> > > >>> > > > My apology for writing back to a very old message, but I am >>> running into >>> > > > this problem below again. I added the python homebrew to my path >>> but >>> > > still >>> > > > grabbing the system's package >>> > > > >>> > > > >>> > > > Here is my path: >>> > > > >>> > > > PATH="${PATH}" >>> > > > >>> > > > export PATH=/usr/local/lib/python2.7/site-packages:$PATH >>> > > > >>> > > > >>> > > > when checking "which python" i get /usr/bin/python not the brew >>> one. >>> > > > >>> > > > Obviously I am still unable to get it up and running again :-( >>> > > > >>> > > > >>> > > > -Ahmed >>> > > > >>> > > > >>> > > > >>> > > > On Sun, Nov 10, 2013 at 1:25 PM, Tamás Nepusz 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 first python (and python-config) in your PATH. Check that by >>> which >>> > > > > python.” >>> > > > > >>> > > > > >>> > > > > >>> > > >>> https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python#homebrew-provided-python-bindings >>> > > > > >>> > > > > 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. >>> > > > > >>> > > > >>> > > >>> > > >>> > > _______________________________________________ >>> > > igraph-help mailing list >>> > > [email protected] >>> > > https://lists.nongnu.org/mailman/listinfo/igraph-help >>> > > >>> > _______________________________________________ >>> > igraph-help mailing list >>> > [email protected] >>> > https://lists.nongnu.org/mailman/listinfo/igraph-help >>> > >>> >>> >> >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
