Ask Your Question
2

Using Pydev (eclipse) and Sage?

asked 2011-07-20 13:15:02 +0200

StevenPollack gravatar image

updated 2011-07-20 15:36:31 +0200

Hi,

I've been googling around to find a way to set up pydev and sage, and have had nothing but the worst of luck.

sage 4.7 is located in /home/steven/sage-4.7, and I've created a "sage_python" python interpreter who's location is "/home/steven/sage-4.7/local/bin/python".

I've set the following environment variables:

SAGE_ROOT = /home/steven/sage-4.7 
LD_LIBRARY_PATH = $SAGE_ROOT/local/lib

Now, when I run the following script (test.py):

#!/usr/bin/env sage -python

import sys 
from sage.all import * 

print 2

When I run the script with sage_python as the interpreter I get the following error:

Traceback (most recent call last):
File "/home/steven/code/whateva/test.py", line 4, in <module> from sage.all import *
File "/home/steven/sage-4.7/local/lib/python2.6/site-packages/sage/ all.py", line 70, in <module> from sage.ext.c_lib import _init_csage, sig_on_count

ImportError: libcsage.so: cannot open shared object file: No such file or directorydirectory

Can anyone help me out with this?

Thanks,

Steven

p.s. I've noticed this post on the sage support google groups, but even when I open eclipse via

$ sage -sh 
$ eclipse &

I get the same error.

edit retag flag offensive close merge delete

Comments

Hello, could you please post how you "run the script with sage_python as the interpreter". I'm working on the same problem, but with eclipse 3.7.0 and Pydev 2.2.1 it does not even let me set sage-4.6.2 as the interpreter, as "sage -u" does not give the desired result.

ivan gravatar imageivan ( 2011-08-22 10:49:02 +0200 )edit

Just type "sage -python" in your terminal, and it will open up the sage_python interpreter.

StevenPollack gravatar imageStevenPollack ( 2011-08-22 15:57:51 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-05-22 20:58:32 +0200

dan_fulea gravatar image

After years of common changes in eclipse, pydev, and sage, here is a solution (to the new problems) of using sage inside eclipse+pydev

error-starting-sage-in-the-eclipse-ide-linux-after-...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-07-20 13:15:02 +0200

Seen: 1,895 times

Last updated: May 22 '17