On Jul 3, 2015, at 1:34 PM, Floriane B wrote: > Me again ! I'm trying to install iGraph to use on FreeCAD's python console. > When asking the question on the dedicated forum, I got the following answer: > > Open terminal and type. > CODE: SELECT ALL > port install py27-igraph > or > CODE: SELECT ALL > sudo port install py27-igraph > > I installed igraph using Macports, and it is now available for me to use on > the default python interface of my computer, Python 2.7.5. > However, when I try to import iGraph in the python console in FreeCAD (which > has solely the same version), I got the following error: > > Traceback (most recent call last): > File "<input>", line 1, in <module> > ImportError: No module named igraph > > > So my question is : is it possible to use MacPorts to install iGraph, but to > choose on which python console ? > The different versions are as follow. > > In FreeCAD: > Python 2.7.5 (default, Jan 20 2014, 20:59:17) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > > Default Python: > Python 2.7.5 (default, Mar 9 2014, 22:15:05) > [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin > > Do you have any idea on how I could reach that goal ?
If you installed py27-igraph using MacPorts, then you can only use py27-igraph when using MacPorts python27. In other words, the command you use to start your python script, or to start the python console, must be /opt/local/bin/python2.7. Using Apple's python included with OS X will not work because it does not know about modules installed with MacPorts. _______________________________________________ macports-users mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-users
