[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Python3 igraph import error on Cygwin

From: Stephen J. Gaffigan
Subject: Re: [igraph] Python3 igraph import error on Cygwin
Date: Tue, 23 Apr 2013 23:08:02 -0400

Hi Tamas,

No such luck. The usual import error I get with a fresh install of igraph from source is because the shared library isn't found because I forget to add a /etc/ld.so.conf.d/igraph.conf file or update LD_LIBRARY_PATH. This is different (though I admit I did still try LD_LIBRARY_PATH with /usr/local/igraph/lib and even the egg/igraph directory, which contains a .dll).

I'm not sure if it's relevant, but it looks like python-igraph was installed into an egg directory in site-packages.
$ ls -d /usr/local/lib/python3.2/site-packages/*igraph*

I was looking for differences between this and a working build on an Ubuntu-Linux system and noted that on Linux it was installed as an egg-info file and igraph directory.
$ ls -d /usr/local/lib/python3.2/dist-packages/*igraph*

I tried adding the egg directory to PYTHONPATH with no success. But the original error suggests that it was already finding the module in the egg. It's inside igraph/__init__.py when the import error occurs. But igraph/_igraph.py is there too, which is why I'm lost why it's not finding it.


On Tue, Apr 23, 2013 at 5:41 PM, Tamás Nepusz <address@hidden> wrote:

> There weren't any build/install errors. But when I try to import, I get an error.
> python3 -c "import igraph"
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/usr/local/lib/python3.2/site-packages/python_igraph-0.6.5-py3.2-cygwin-1.7.17-i686.egg/igraph/__init__.py", line 34, in <module>
>    from igraph._igraph import *
> ImportError: No such file or directory
> Does this sound familiar to anyone?
I usually see this message when I try to import igraph straight from the folder where I unpacked the source code of the C interface. Since the source tarball of the Python interface contains a folder named "igraph", Python tries to import the igraph._igraph module from there but of course it won't find the module because it has been compiled somewhere deep in build/ and installed in /usr/local. The solution is simply to change to another folder that does not contain a subfolder named "igraph".

If it didn't work for you, let me know and we'll figure it out.


igraph-help mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]