Ask Your Question

update package scipy

asked 2020-05-05 13:39:38 +0100

21er33 gravatar image

Hi! I would like to update the scipy package used by sage. It uses 1.2 while I would like to use 1.4 (which I have on my system, but don't mind installing in sage's python toolchain).

Is this possible? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-05-05 16:02:05 +0100

tmonteil gravatar image

updated 2020-05-05 17:15:30 +0100

scipy is held to 1.2.x because we still want to support Python2 for the upcoming Sage 9.1, and further versions of scipy are Python3-only.

Now, you can do, from a terminal:

sage -pip install --upgrade scipy

EDIT the non-lazy version is to use the Sage package manager:

  • download within sage's upstream/ directory

  • edit /build/pkgs/scipy/package-version.txt so that it contains the string 1.4.1

  • run sage --package fix-checksum to fix the checksums

  • run sage -i scipy to install the package

At your own risks ;)

edit flag offensive delete link more


I did this, but sage still gives (and I checked if it was using the newer features of simpy, which is not):

sage: from sage.misc.package import list_packages, installed_packages
sage: installed_packages()['scipy']


$ sage -pip show scipy
Name: scipy
Version: 1.4.1
Summary: SciPy: Scientific Library for Python
Author: None
Author-email: None
License: BSD
Location: /home/user/programs/SageMath/local/lib/python3.7/site-packages
Requires: numpy
21er33 gravatar image21er33 ( 2020-05-05 16:15:22 +0100 )edit

The first comment is an artifact of Sage package management, which the proposed simplest method skipped. Could you please provide code that shows that latest features are not taken into account.

tmonteil gravatar imagetmonteil ( 2020-05-05 16:32:00 +0100 )edit

sorry, I should have edited my comment, I hadn't restarted sage (maybe...), but it seems to work,

sage: import scipy
sage: scipy.__version__


21er33 gravatar image21er33 ( 2020-05-05 17:16:26 +0100 )edit

OK. I was surprized !

tmonteil gravatar imagetmonteil ( 2020-05-05 17:20:48 +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



Asked: 2020-05-05 13:39:38 +0100

Seen: 546 times

Last updated: May 05 '20