First time here? Check out the FAQ!

Ask Your Question
1

update package scipy

asked 4 years ago

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 4 years ago

tmonteil gravatar image

updated 4 years ago

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 ;)

Preview: (hide)
link

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 ( 4 years ago )
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 ( 4 years ago )

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 ( 4 years ago )

OK. I was surprized !

tmonteil gravatar imagetmonteil ( 4 years ago )

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

Seen: 765 times

Last updated: May 05 '20