Ask Your Question
0

installing sage-8.8-Ubuntu_18.04-x86_64.tar.bz2

asked 2019-09-11 22:25:42 +0100

ortollj gravatar image

updated 2022-01-21 11:10:45 +0100

FrédéricC gravatar image

HI

cat /etc/os-release

NAME="Ubuntu" VERSION="18.04.3 LTS (Bionic Beaver)"

What do I need to do for /home/ortollj/.cache/pip/http ? See the message below

and why the date is this one ?:SageMath version 8.1, Release Date: 2017-12-07 │ │

https://ask.sagemath.org/question/461...

cd Downloads/
tar -xjf *.tar.bz2

apt install sagemath-common
pip install six
 apt install python-pip
 pip install six


Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@ortollj-SATELLITE-C70-B:~/Downloads/SageMath# pip install six
The directory '/home/ortollj/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ortollj/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages
edit retag flag offensive close merge delete

Comments

I did this process to install UBUNTU and W1O dual boot: dual boot Ubuntu W10 process

ortollj gravatar imageortollj ( 2019-09-12 17:07:43 +0100 )edit

@ortollj I don't think dual booting has anything to do with it. Installing Sage on Ubuntu or Windows is totally different...

Iguananaut gravatar imageIguananaut ( 2019-09-13 16:11:59 +0100 )edit

Unless, that is, you're trying to share your home directory between Windows and Linux partitions which, if so, would be worth actually specifying. Using an NFTS partition as your home directory may not work for some Linux software, as *nix permissions can't be emulated exactly (or at all) on NTFS partitions.

Iguananaut gravatar imageIguananaut ( 2019-09-13 16:14:25 +0100 )edit

@Iguananaut:

Yes I know. I just added this information in the case or someone else would like to try the dual boot

ortollj gravatar imageortollj ( 2019-09-13 16:18:14 +0100 )edit

how can I see the Linux OS partition mode (NTFS or FAT32) , with fdisk ?

sudo fdisk -l

Device          Start        End    Sectors   Size Type
/dev/sda1        2048    2099199    2097152     1G Windows recovery environment
/dev/sda2     2099200    2303999     204800   100M EFI System
/dev/sda3     2304000    2566143     262144   128M Microsoft reserved
/dev/sda4     2566144 1722884870 1720318727 820,3G Microsoft basic data
/dev/sda5  1927686144 1929756671    2070528  1011M Windows recovery environment
/dev/sda6  1929756672 1953523711   23767040  11,3G Windows recovery environment
/dev/sda7  1722886144 1927686143  204800000  97,7G Linux filesystem
ortollj gravatar imageortollj ( 2019-09-13 16:32:45 +0100 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2019-09-13 16:43:38 +0100

Iguananaut gravatar image

updated 2019-09-13 16:46:03 +0100

Here's what I did:

$ cd ~/Downloads
$ wget http://www-ftp.lip6.fr/pub/math/sagemath/linux/64bit/sage-8.8-Ubuntu_18.04-x86_64.tar.bz2
$ echo '171b62272a6bf869246fd9fdbc37eff1 *sage-8.8-Ubuntu_18.04-x86_64.tar.bz2' | md5sum -c
$ mkdir -p ~/.local/opt  # This is just where I opted to put it for myself; this is up to you
$ tar xf sage-8.8-Ubuntu_18.04-x86_64.tar.bz2 -C ~/.local/opt/
$ cd ~/.local/opt/SageMath
$ ./sage

Running ./sage for the first time outputs:

Rewriting paths for your new installation directory
===================================================

This might take a few minutes but only has to be done once.

patching /home/embray/.local/opt/SageMath/build/make/Makefile-auto
... many more lines like this ...
patching /home/embray/.local/opt/SageMath/src/sage/ext/interpreters/wrapper_rr.pyx
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.8, Release Date: 2019-06-26                     │
│ Using Python 2.7.15. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
Setting permissions of DOT_SAGE directory so only you can read and write it.
sage:

I also made a symlink:

$ ln -s ../opt/SageMath/sage ~/.local/bin/

Because I have ~/.local/bin on my $PATH, now I can run that Sage installation by just typing sage at the command prompt.

Also FWIW I have:

$ which python
/usr/bin/python
$ python --version
Python 2.7.15+
$ dpkg -S `which python`
python-minimal: /usr/bin/python

I also noticed in your original post that you were running as root. That might be part of your problem. If you're taking various arbitrary actions on your system as root then you can break almost anything.

edit flag offensive delete link more

Comments

since I've re-installed Ubuntu I did not run anymore as root. I do not understand it is like I did not install Python 2.7 !!

ortollj@ortollj-SATELLITE-C70-B:~/Downloads$ rm -r SageMathInstallation/
ortollj@ortollj-SATELLITE-C70-B:~/Downloads$ ls
sage-8.8-Ubuntu_18.04-x86_64.tar.bz2
ortollj@ortollj-SATELLITE-C70-B:~/Downloads$ tar xf sage-8.8-Ubuntu_18.04-x86_64.tar.bz2
ortollj@ortollj-SATELLITE-C70-B:~/Downloads$ ls
sage-8.8-Ubuntu_18.04-x86_64.tar.bz2  SageMath
ortollj@ortollj-SATELLITE-C70-B:~/Downloads$ cd SageMath/
ortollj gravatar imageortollj ( 2019-09-13 17:56:36 +0100 )edit

this is what I see:

ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMath$ ./sage
/usr/bin/env: ‘python’: No such file or directory
Error running the script 'relocate-once.py'.
ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMath$ 
ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMath$ python --version
Command 'python' not found, but can be installed with:
sudo apt install python3       
sudo apt install python        
sudo apt install python-minimal
You also have python3 installed, you can run 'python3' instead.
ortollj gravatar imageortollj ( 2019-09-13 17:57:11 +0100 )edit

what command I have to run to install python 2.7 ?

Sorry @tmonteil I was certain to have installed 2.7 ! ;-(

ortollj gravatar imageortollj ( 2019-09-13 17:59:39 +0100 )edit

but it seems I did install python 2.7.

it actually looks like the python 2.7 installation I did works . it's a crazy story !!!

ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMath$ python2.7 -V
Python 2.7.16
ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMath$
ortollj gravatar imageortollj ( 2019-09-13 18:13:30 +0100 )edit
1

You have to do sudo apt install python

tmonteil gravatar imagetmonteil ( 2019-09-13 18:23:48 +0100 )edit
1

answered 2019-09-12 01:31:42 +0100

tmonteil gravatar image

You seem to be doing contractictoty things:

  • when you write tar -xjf *.tar.bz2, you seem to be willing to install Sage from some binaries downloaded from Sage website.

  • when you write apt install sagemath-common, you seem to be willing to install Sage from Ubuntu repositories, but then you should install sagemath-jupyter, because sagemath-common only ships some file that are common to all arcitectures (in particular, it does not provide compiled files, which are required).

Which Sage do you want to install ?

If you want to install six, you should do that as a normal user, with the command pip install --user six. In the example you gave, you are running the pip command as root, wich is not advised, and which probably explains the error messages you get.

edit flag offensive delete link more

Comments

ok thank you tmonteil

ortollj gravatar imageortollj ( 2019-09-12 05:10:21 +0100 )edit

just one more question can I uncompress the TAR file in the Download folder, or is there a more desirable folder ? do I need to install Latex ? http://doc.sagemath.org/html/en/insta...

ortollj gravatar imageortollj ( 2019-09-12 09:21:33 +0100 )edit

Yes you can, it is really up to you as long as you do not do that as root, but I would suggest to unpack the tarball in a dedicated directory, like "~/sage".or whatever Note that once you unpack and run ./sage from that directory, you can not move it anymore since some paths are hardcoded, so if you want to move the Sage directory, you should re-unpack it.

tmonteil gravatar imagetmonteil ( 2019-09-12 11:15:36 +0100 )edit

after re installing Ubuntu and untar sagemath again, sorry but now I can't even launch sage !

ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMathInstallation$ tar -xjf *.tar.bz2
ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMathInstallation$ ls
sage-8.8-Ubuntu_18.04-x86_64.tar.bz2  SageMath
ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMathInstallation$ cd SageMath/
ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMathInstallation/SageMath$ ls
bootstrap  config         configure     COPYING.txt  local  m4        README.md         sage  upstream
build      config.status  configure.ac  docker       logs   Makefile  relocate-once.py  src   VERSION.txt
ortollj@ortollj-SATELLITE-C70-B:~/Downloads/SageMathInstallation/SageMath$ sage

Command 'sage' not found, but can be installed with:

sud

ortollj gravatar imageortollj ( 2019-09-12 14:24:03 +0100 )edit

not enough place above:

Command 'sage' not found, but can be installed with:

sudo apt install sagemath-common
ortollj gravatar imageortollj ( 2019-09-12 14:27:56 +0100 )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: 2019-09-11 22:25:42 +0100

Seen: 815 times

Last updated: Sep 13 '19