Ask Your Question
0

How to use a python lib by sageMath?

asked 2020-04-04 13:27:38 +0200

Hello,

Here's my problem :

I have sage v.9 in my Debian 4.9 and I want to use it by importing a python lib that I downloaded from a private repo on Github. This library is in a repo in which there is a makefile in which I have to indicate the path of sage's binary, otherwise I can't run a make. The first line of the makefile is : SAGE= but the problem is, I don't know what is the path I should indicate. To launch sagev9, I do cd /home/my_name/SageMath/ && ./sage.

So with HOME=/home/my_name, I tried :

SAGE=$(HOME)/SageMath/sage

SAGE=$(HOME)/SageMath/local/bin/sage

SAGE=$(HOME)/SageMath/src/bin/sage

but none of them works. When I type make, I received the error : Error: You must set the SAGE_ROOT environment variable or run this script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory. Error setting environment variables by sourcing '/home/rachidi/SageMath/local/bin/sage-env';

Do you please know what path I have to indicate?

Thanks.

edit retag flag offensive close merge delete

Comments

John Palmieri gravatar imageJohn Palmieri ( 2020-04-04 17:07:20 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-04-04 19:21:35 +0200

vdelecroix gravatar image

You could try to switch to the sage shell environment

$ /home/my_name/SageMath/sage -sh

And then run make.

edit flag offensive delete link more
0

answered 2020-04-04 22:48:57 +0200

Sébastien gravatar image

Did you try to specify the path that contains the script sage? , i.e., just

SAGE=$(HOME)/SageMath

which is the usual SAGE_ROOT folder.

edit flag offensive delete link more

Comments

As I said, this is also being discussed at https://stackoverflow.com/questions/6..., and I asked that question there.

John Palmieri gravatar imageJohn Palmieri ( 2020-04-04 23:40:09 +0200 )edit

oups, excuse me.

Sébastien gravatar imageSébastien ( 2020-04-05 17:29:42 +0200 )edit

I'm just trying to avoid duplication of effort.

John Palmieri gravatar imageJohn Palmieri ( 2020-04-05 20:59:18 +0200 )edit

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: 2020-04-04 13:27:38 +0200

Seen: 437 times

Last updated: Apr 04 '20