Escript in Spyder or Spe

Asked by Fokke

Im willing to work with escript/finley within a scientific context, such as what pythonxy is developed for.
However I got trouble with installing it in windows, and made the change in installing Ubuntu 11.10.
I got escript working, however only within the terminal and not within the environment I would like to, such as Spyder or Spe.
When I append the correct path, as sys.path.append("/usr/lib/escript/"), and execute, esys.escript, I got the error:
ImportError: cannot open shared object file: No such file or directory

I looked a little bit on the internet and found something similar (at least I think),

However I am a complete newbie to programming (besides working alittle bit in matlab and pythonxy ) and linux, so can't get it to work. Hope someone would be able to help :-).

Thanks in advance,

Question information

English Edit question
esys-escript Edit question
No assignee Edit question
Solved by:
Joel Fenwick
Last query:
Last reply:
Revision history for this message
Best Joel Fenwick (j-fenwick1) said :

Hi Fokke,
     There are two paths which need to be set for escript to find its libraries.
sys.path in python controls the python module path.
You also need to tell it where to find non-python libraries.

In unix/Linux this is done using the LD_LIBRARY_PATH variable.

Lets try something else first though.
Did you install one of our prebuilt ubuntu packages?

If so you can try this:

eval $(run-escript -e)

then run python and see if escript works.
If so then try running your other tools (from the same terminal).

Revision history for this message
Fokke (f-swart) said :

Hi Joel!

thanks for your quick reply!
The eval $(run-escript -e) statment and then spyder or Spe worked!
So that is perfect :-), and thank you for that.

However, Im curious about the LD_LIBRARY_PATH variable.
I will look for some lit. about it.
However so it seems that my problem is solved or do I overlook something?

Revision history for this message
Fokke (f-swart) said :

Thanks Joel Fenwick, that solved my question.