[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Help installing Python-igraph
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] Help installing Python-igraph |
Date: |
Mon, 13 Aug 2012 11:33:11 +0200 |
Hi Evan,
Seems like we have two separate problems here:
1. In the 64-bit case, it looks like the _igraph.so file (which is essentially
the glue code between the C core of igraph and Python) is not built for some
reason. I strongly suspect that this is because the C core is built as a 32-bit
library since the _igraph.so file appears fine if you compile a 32-bit version.
Can you please check whether _igraph.so is really built as a 64-bit library? If
so, can you Can you please post the full output of "python setup.py clean
build --prefix=/unsup/igraph-0.6/$(sys)" for the 64-bit build?
2. In the 32-bit case, it seems for me that the library builds fine. One catch
is that you cannot "import igraph" if you are standing in the source tree of
the Python interface, because the "igraph" subdirectory in the source tree
precedes the "igraph" subdirectory in
/unsup/igraph-0.6/$(sys)/lib/python2.7/site-packages, and the former does not
have an _igraph.so. The solution is to change to a different directory which
does not have an igraph subdirectory and it should be fine.
Best,--
T.
On Friday, 10 August 2012 at 22:42, Evan Driscoll wrote:
> Hi,
>
> I'm on a 64-bit RHEL5 (/6) machine and am having trouble installing the
> Python bindings. Any ideas of what I'm doing wrong and how to fix it
> would be appreciated.
>
> I have igraph itself installed at a prefix of /unsup/igraph-0.6/$(sys),
> and I do the following to try to get Python working:
>
> mkdir -p /unsup/igraph-0.6/$(sys)/lib/python2.7/site-packages/
> export PYTHONPATH=/unsup/igraph-0.6/$(sys)/lib/python2.7/site-packages/
> export PKG_CONFIG_PATH=/unsup/igraph-0.6/$(sys)/lib/pkgconfig
> export LD_LIBRARY_PATH=/unsup/igraph-0.6/$(sys)/lib
>
> python setup.py install --prefix=/unsup/igraph-0.6/$(sys)
>
> (The command $(sys) expands to either 'amd64_rhel5' or 'amd64_rhel6'.)
>
> However, when I try to 'import igraph', it says it can't find module
> '_igraph'. Furthermore, if I look into the site-packages directory named
> above, it's emptyish:
>
> $ tree /unsup/igraph-0.6/$(sys)/lib/python2.7/site-packages
> /unsup/igraph-0.6/amd64_rhel5/lib/python2.7/site-packages
> |-- easy-install.pth
> |-- python_igraph-0.6-py2.7-linux-x86_64.egg
> |-- site.py
> `-- site.pyc
> 0 directories, 4 files
>
> This is the case on both RHEL5 and 6.
>
> ----------
> Interestingly, 32-bit RHEL5 does more:
> $ tree /unsup/igraph-0.6/i386_rhel5/lib/python2.7/site-packages
> /unsup/igraph-0.6/i386_rhel5/lib/python2.7/site-packages
> |-- igraph
> | |-- __init__.py
> | |-- __init__.pyc
> | |-- _igraph.so
> | |-- app
> | | |-- __init__.py
> ...
> 5 directories, 106 files
>
> but it still complains that it can't find the _igraph module. (I have
> PYTHONPATH=/unsup/igraph-0.6/i386_rhel5/lib/python2.7/site-packages and
> LD_LIBRARY_PATH=/unsup/igraph-0.6/i386_rhel5/lib/.)
>
> Finally, there are _igraph.so files under build/ in the source tree (and
> as you can see above, that's present in
>
> ------------
> I admit that this setup is a bit strange, and it could very easily be
> picking up the wrong Python when doing compilation or something, though
> I haven't had much problems installing Python modules in the past.
>
> Evan
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden (mailto:address@hidden)
> https://lists.nongnu.org/mailman/listinfo/igraph-help