[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] newbie python question
From: |
Simone Gabbriellini |
Subject: |
Re: [igraph] newbie python question |
Date: |
Sun, 7 Sep 2008 01:35:12 +0200 |
I moved the igraph folder into the package folder of MacPython, seems
to find it but I have this error while attempting to load the module:
>>> import igraph
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
import igraph
File "/Library/Python/2.5/site-packages/igraph/__init__.py", line
30, in <module>
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/igraph/core.so, 2): Library not loaded: /
sw/lib/libgmp.3.dylib
Referenced from: /usr/lib/libigraph.0.dylib
Reason: image not found
do you understand this error? what image is looking for?
thanks,
Simone
Il giorno 06/set/08, alle ore 20:40, Tamas Nepusz ha scritto:
is it possible to use igraph as a Python module from MacPython IDLE?
Yes.
I have downloaded and run the Leopard installer for python-igraph,
but I don't know where it installs all the stuff...
On my Mac, it is installed in /Library/Python/2.5/site-packages/
igraph. Note that this place most probably belongs to the standard
Python installation (i.e., the one that comes with OS X built-in)
and not MacPython. I don't use MacPython myself, I just simply
launch the Python interpreter from the command line by typing
"python". So, if you are not able to import igraph in MacPython's
IDLE, the most likely reason is that MacPython's import path is
different from OS X's default Python version. To check the import
path in MacPython, launch it and type:
import sys
print sys.path
The import path includes all the directories where Python searches
for packages. If /Library/Python/2.5/site-packages is not included
among them, you can either add it manually:
sys.path.insert(0, '/Library/Python/2.5/site-packages')
or you can copy the whole igraph subdirectory from /Library/Python/
2.5/site-packages to one of the directories mentioned in MacPython's
path.
--
Tamas
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help