igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] MAtlab/igraph conflict?


From: Tamas Nepusz
Subject: Re: [igraph] MAtlab/igraph conflict?
Date: Mon, 23 Feb 2009 13:07:40 +0000

Dear Alessandro,

Matlab is using its own copy of the C runtime library and its version number is different from the C runtime you used when compiling igraph. When you try system('python script.py'), it tries to link to Matlab's C runtime with the igraph module and of course it won't succeed. Judging from the fact that it works with 'sudo python script.py', I guess that Matlab modifies the library search path using some environment variable and this variable is cleared in the subshell launched by sudo. So, I'd suggest you to try the following:

system('/usr/bin/env python script.py')

env clears the environment variables just like sudo, but it won't switch to the superuser account. I hope it helps.

--
Tamas

On 2009.02.23., at 13:02, Alessandro Antonucci wrote:

Dear Igraphers,

I'm running a Python script based on (Python)igraph
in a linux environment. This script should interact with
Matlab, but, if I try to run the script from Matlab, by a
(Matlab) command like:

system('python script.py')

I receive the following error:

____________________________

File "/home/alessandro/Lab/
ImpreciseGraphicalProbabilisticModels/__init__.py", line 1, in <module>
from igraph import *
File "build/lib.linux-i686-2.5/igraph/__init__.py", line 30, in <module> ImportError: /opt/matlab/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/libigraph.so.0)
____________________________

I've also noticed that if I run the script as a superuser, which means
if I run Matlab as a normal user, but I run the command:

system('sudo python script.py')

everything works fine.

Any idea about what is going wrong?

Best,

Alessandro
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help





reply via email to

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