igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Python : ImportError: No module named core


From: Gábor Csárdi
Subject: Re: [igraph] Python : ImportError: No module named core
Date: Thu, 5 Aug 2010 11:21:33 +0200

Hi Matthew,

thanks for the code!

A couple of things. First, we prefer C code in igraph, instead of C++,
igraph is essentially a C library. The only parts we have in C++ are
bigger chunks of external code, implementing some unique algorithm
that we definitely want to have in igraph (e.g. the BLISS graph
isomorphism code, some community detection algorithms, etc.). C++ code
tends to be more difficult to maintain, less portable, 95% of the
portability issues we have are because of the C++ code.

Second, igraph has a testing framework already, based on the autotest
tools. Probably not as flexible as unit++, but all the other tests are
using it.

I think it would not take too long to rewrite your code to use only C
code and add a test for it in our test suite. Of course we would be
happy to let you do this :), or alternatively, I can do it as well.

Thanks again!
Best Regards,
Gabor

On Mon, Aug 2, 2010 at 11:29 PM, Matthew Walker
<address@hidden> wrote:
> Hi,
>
> I dont know if this is useful to you (as I'm certain your implementation
> would be more efficient), but attached are my two efforts for implementing a
> "radius" measure: one in python and one in C/C++.
>
> For the C++ I used unit++ [1] to test my code (but to be honest it's the
> first time I've worked with that too, so it might not be the best example of
> it's usage!)
>
> Cheers,
>
> Matthew
>
> [1] http://unitpp.sourceforge.net/
>
> On 10-07-28 06:17 PM, Matthew Walker wrote:
>>
>> Hi,
>>
>> I am new to python and thought it would be interesting to try to
>> implement a "radius" measure as a first taste to how igraph and python
>> work together.  (I'm assuming "radius" [1] isn't already in igraph... at
>> least I couldn't find it)
>>
>> I do not have root access to this computer so I have installed igraph
>> (0.5.3) locally using:
>> ./configure --prefix=$HOME/system
>> make
>> make install
>>
>> I then installed python-igraph using:
>> python setup.py install --home=$HOME/system
>>
>> That all seemed to work without any problems.  But when I try to import
>> igraph into python I get this error:
>>
>> $ python
>> Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
>> [GCC 4.4.3] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>  >>>  import igraph
>> Traceback (most recent call last):
>>    File "<stdin>", line 1, in<module>
>>    File "igraph/__init__.py", line 30, in<module>
>>      from igraph.core import *
>> ImportError: No module named core
>>
>> I have seen a lot of other emails regarding this error and that there
>> has to be a core.so file in the correct place.  Well, I can't find
>> core.so no matter where I look!  However, neither can I figure out how I
>> should produce core.so.
>>
>> I do have libcxcore.so but I suspect that is a completely different story.
>>
>> Can someone please tell me what I'm doing wrong? Or at least what to do
>> right ;o)
>>
>> Thanks greatly,
>>
>> Matthew
>>
>> [1] http://mathworld.wolfram.com/GraphRadius.html
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM



reply via email to

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