Ask Your Question

update package scipy

asked 2020-05-05 06:39:38 -0500

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 09:02:05 -0500

tmonteil gravatar image

updated 2020-05-05 10:15:30 -0500

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 09:15:22 -0500 )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 09:32:00 -0500 )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 10:16:26 -0500 )edit

OK. I was surprized !

tmonteil gravatar imagetmonteil ( 2020-05-05 10:20:48 -0500 )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 06:39:38 -0500

Seen: 92 times

Last updated: May 05