Ask Your Question
1

sagemath : sage test fail

asked 3 years ago

manzar gravatar image

updated 2 years ago

FrédéricC gravatar image

I got the following error while running the sage -t command.

$ sage -t test.py
Traceback (most recent call last):
  File "/usr/share/sagemath/bin/sage-runtests", line 178, in <module>
    DC = DocTestController(options, args)
  File "/usr/lib/python3/dist-packages/sage/doctest/control.py", line 358, 
in __init__
    for pkg in list_packages('optional', local=True).values():
  File "/usr/lib/python3/dist-packages/sage/misc/package.py", line 236, in 
list_packages
    for p in os.listdir(SAGE_PKGS):
FileNotFoundError: [Errno 2] No such file or directory: 
'/usr/share/sagemath/build/pkgs'

I attached the following information about the version:

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04

Python 3.8.10

$ sage
┌────────────────────────────────────────────────────────────────────┐
 SageMath version 9.0, Release Date: 2020-01-01                     
 Using Python 3.8.10. Type "help()" for help.                       
└────────────────────────────────────────────────────────────────────┘
sage:
Preview: (hide)

Comments

Welcome to Ask Sage! Thank you for your question.

slelievre gravatar imageslelievre ( 3 years ago )

How did you install Sage?

What are you trying to test?

slelievre gravatar imageslelievre ( 3 years ago )

I install Sage by Linux Package Manager : sudo apt install sagemath . It is the implementation of KYBER algorithm: https://github.com/fvirdia/lwe-on-rsa...

manzar gravatar imagemanzar ( 3 years ago )

2 Answers

Sort by » oldest newest most voted
1

answered 3 years ago

eric_g gravatar image

updated 3 years ago

The Ubuntu package sagemathdoes not offer all the functionalities for advanced use of SageMath, like testing or installing additional packages. I would therefore suggest that you install SageMath in your home directory by downloading the binary image for Ubuntu 20.04 from https://www.sagemath.org/download-lin.... Simply do

sudo apt-get install python-is-python3
tar jxvf sage-9.4-Ubuntu_20.04-x86_64.tar.bz2
cd SageMath
./sage -n jupyter

Then ./sage -t should work from the directory SageMath. As a bonus, you'll get the latest version of Sage (9.4), while the Ubuntu package is only 9.0.

Preview: (hide)
link
0

answered 3 years ago

manzar gravatar image

Thank you for your time and thank you for your response. I have tested this solution. It does not work for me. still get errors.

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

Seen: 378 times

Last updated: Dec 02 '21