First time here? Check out the FAQ!

Ask Your Question
1

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

asked 0 years ago

rocfus gravatar image

updated 0 years ago

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.

Preview: (hide)

Comments

What is the file sage.py that you mention?

vdelecroix gravatar imagevdelecroix ( 0 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 0 years ago

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 *.

Preview: (hide)
link

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: 0 years ago

Seen: 334 times

Last updated: Nov 01 '24