Ask Your Question
1

Running Sage as a Command and Importing as a Python Library in Kali Linux

asked 2024-11-01 19:30:06 +0100

rocfus gravatar image

updated 2024-11-01 21:14:17 +0100

I've successfully managed to install SageMath on Kali Linux by following this guide : pastebin.com/6m6ypB2N. While I can run SageMath using the following command: ./sage However, this is different from other people's Sage, where they can run it using the sage command like Python. Also, I want to import Sage as a library in Python using: from sage.all import * since many prewritten algorithms and libraries are written in Python. I have no idea why my Sage installation behaves differently and not like other people's installations, and I can't find any related guides anywhere.

edit retag flag offensive close merge delete

Comments

What is the file sage.py that you mention?

vdelecroix gravatar imagevdelecroix ( 2024-11-01 20:11:24 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2024-11-01 20:15:27 +0100

vdelecroix gravatar image

The link you sent explains how to compile SageMath from its source code. This is more or less what is described in the manual at https://doc.sagemath.org/html/en/inst....

Most likely, sage is installed as as a python virtual environment. You can still run Python in this environment and then use from sage.all import *.

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: 2024-11-01 19:30:06 +0100

Seen: 151 times

Last updated: Nov 01