Ask Your Question
1

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
2

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 https://github.com/scipy/scipy/releas... 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

Comments

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']
'1.2.0'

although:

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

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__
'1.4.1'

Thanks!

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

2 followers

Stats

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

Seen: 711 times

Last updated: May 05 '20