ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 07 May 2013 05:55:20 -0500Updating scipy in sagehttp://ask.sagemath.org/question/7910/updating-scipy-in-sage/I am trying to use the "griddata" from "scipy.interpolate". However, the scipy present in scipy is version 0.7 and griddata is implemented 0.9 onwards. Is there a way to upgrade scipy to version 0.9 in sage? I understand that 0.9 is a development version but is there a way to upgrade just scipy to development version?Fri, 28 Jan 2011 13:04:39 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/Comment by kcrisman for <p>I am trying to use the "griddata" from "scipy.interpolate". However, the scipy present in scipy is version 0.7 and griddata is implemented 0.9 onwards. Is there a way to upgrade scipy to version 0.9 in sage? I understand that 0.9 is a development version but is there a way to upgrade just scipy to development version?</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22216#post-id-22216This won't help you per se, but Scipy 0.8 is actually in Sage 4.6.1.Sat, 29 Jan 2011 14:56:25 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22216#post-id-22216Answer by kcrisman for <p>I am trying to use the "griddata" from "scipy.interpolate". However, the scipy present in scipy is version 0.7 and griddata is implemented 0.9 onwards. Is there a way to upgrade scipy to version 0.9 in sage? I understand that 0.9 is a development version but is there a way to upgrade just scipy to development version?</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12038#post-id-12038There are a couple ways to do this, I think.
- My preferred way is that you try to upgrade the spkg (Sage package) currently in Sage (0.8) to the next release (if it's stable) and then begin the review process. Instructions for how to do this are [here](http://www.sagemath.org/doc/developer/patching_spkgs.html) in the developer guide.
- Since that is probably more work than you would like just to use it, I think you should be able to use a separately downloaded Scipy from within your Sage by importing it. I'm not quite sure where it would have to live, nor whether you'd have to name it something different. But since Sage *is* essentially Python-based, you could at least try `sage: sys.path.append('/path/to/my-scipy-dir'); import my-scipy` or something like that. If this is totally wrong, undoubtedly someone will let me know.Sat, 29 Jan 2011 15:01:43 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12038#post-id-12038Comment by Jason Grout for <p>There are a couple ways to do this, I think.</p>
<ul>
<li><p>My preferred way is that you try to upgrade the spkg (Sage package) currently in Sage (0.8) to the next release (if it's stable) and then begin the review process. Instructions for how to do this are <a href="http://www.sagemath.org/doc/developer/patching_spkgs.html">here</a> in the developer guide.</p></li>
<li><p>Since that is probably more work than you would like just to use it, I think you should be able to use a separately downloaded Scipy from within your Sage by importing it. I'm not quite sure where it would have to live, nor whether you'd have to name it something different. But since Sage <em>is</em> essentially Python-based, you could at least try <code>sage: sys.path.append('/path/to/my-scipy-dir'); import my-scipy</code> or something like that. If this is totally wrong, undoubtedly someone will let me know.</p></li>
</ul>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22069#post-id-22069Well first scipy 0.9 needs to be released. Then probably one or two Sage releases after that. So probably at least a month.Mon, 21 Feb 2011 09:45:20 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22069#post-id-22069Comment by Jason Grout for <p>There are a couple ways to do this, I think.</p>
<ul>
<li><p>My preferred way is that you try to upgrade the spkg (Sage package) currently in Sage (0.8) to the next release (if it's stable) and then begin the review process. Instructions for how to do this are <a href="http://www.sagemath.org/doc/developer/patching_spkgs.html">here</a> in the developer guide.</p></li>
<li><p>Since that is probably more work than you would like just to use it, I think you should be able to use a separately downloaded Scipy from within your Sage by importing it. I'm not quite sure where it would have to live, nor whether you'd have to name it something different. But since Sage <em>is</em> essentially Python-based, you could at least try <code>sage: sys.path.append('/path/to/my-scipy-dir'); import my-scipy</code> or something like that. If this is totally wrong, undoubtedly someone will let me know.</p></li>
</ul>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22075#post-id-220750.9 is just about to be released (I believe scipy is currently at 0.9rc4). I've been watching it and waiting for them to release 0.9 before upgrading the Sage spkg.Sat, 19 Feb 2011 06:38:58 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22075#post-id-22075Comment by Shashank for <p>There are a couple ways to do this, I think.</p>
<ul>
<li><p>My preferred way is that you try to upgrade the spkg (Sage package) currently in Sage (0.8) to the next release (if it's stable) and then begin the review process. Instructions for how to do this are <a href="http://www.sagemath.org/doc/developer/patching_spkgs.html">here</a> in the developer guide.</p></li>
<li><p>Since that is probably more work than you would like just to use it, I think you should be able to use a separately downloaded Scipy from within your Sage by importing it. I'm not quite sure where it would have to live, nor whether you'd have to name it something different. But since Sage <em>is</em> essentially Python-based, you could at least try <code>sage: sys.path.append('/path/to/my-scipy-dir'); import my-scipy</code> or something like that. If this is totally wrong, undoubtedly someone will let me know.</p></li>
</ul>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22215#post-id-22215I tried the second option. I am not very good at python but I was not able to do it with my limited python knowledge. I have scipy install on my machine. I can call 0.9.0 commands (griddata) when I use standalone python in the terminal but i cannot wrap it with sage.Sat, 29 Jan 2011 15:22:28 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22215#post-id-22215Comment by Shashank for <p>There are a couple ways to do this, I think.</p>
<ul>
<li><p>My preferred way is that you try to upgrade the spkg (Sage package) currently in Sage (0.8) to the next release (if it's stable) and then begin the review process. Instructions for how to do this are <a href="http://www.sagemath.org/doc/developer/patching_spkgs.html">here</a> in the developer guide.</p></li>
<li><p>Since that is probably more work than you would like just to use it, I think you should be able to use a separately downloaded Scipy from within your Sage by importing it. I'm not quite sure where it would have to live, nor whether you'd have to name it something different. But since Sage <em>is</em> essentially Python-based, you could at least try <code>sage: sys.path.append('/path/to/my-scipy-dir'); import my-scipy</code> or something like that. If this is totally wrong, undoubtedly someone will let me know.</p></li>
</ul>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22074#post-id-22074Thanks for the information. What is the time scale we are talking about? Right now I managed to install scipy 0.9.0 on my machine. I just divided my scipy part and sage part. I run the scipy part on my system python and pass the output to sage later. It is a bit cumbersome that way.Sat, 19 Feb 2011 08:34:48 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22074#post-id-22074Answer by fbissey for <p>I am trying to use the "griddata" from "scipy.interpolate". However, the scipy present in scipy is version 0.7 and griddata is implemented 0.9 onwards. Is there a way to upgrade scipy to version 0.9 in sage? I understand that 0.9 is a development version but is there a way to upgrade just scipy to development version?</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12091#post-id-12091You can try something very dirty that will probably work. Sage's spkg are stored in spkg/standard. I assume you have a tarball for scipy-0.9.
1) go to spkg/standard
2) tar xvfj scipy-0.8
3) cd scipy-0.8
4) rm -rf src/
5) mkdir src
6) untar the scipy-0.9 tarball
7) copy the content of the scipy-0.9 folder in the src folder
8) going back to spkg/standard
9) mv scipy-0.8 scipy-0.9
10) tar cvf scipy-0.9.tar scipy-0.9
11) bzip2 scipy-0.9.tar
12) mv scipy-0.9.tar.bz2 scipy-0.9.spkg
13) cd ../..
14) sage -f scipy-0.9
15) wait for scipy-0.9 to install (cross fingers)
16) start sage (no need for sage -b scipy is a runtime dependency not a build time
one)
17) enjoy scipy-0.9 in sage - hopefullyThu, 10 Feb 2011 21:30:16 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12091#post-id-12091Comment by Shashank for <p>You can try something very dirty that will probably work. Sage's spkg are stored in spkg/standard. I assume you have a tarball for scipy-0.9. </p>
<p>1) go to spkg/standard</p>
<p>2) tar xvfj scipy-0.8</p>
<p>3) cd scipy-0.8</p>
<p>4) rm -rf src/</p>
<p>5) mkdir src</p>
<p>6) untar the scipy-0.9 tarball</p>
<p>7) copy the content of the scipy-0.9 folder in the src folder</p>
<p>8) going back to spkg/standard</p>
<p>9) mv scipy-0.8 scipy-0.9</p>
<p>10) tar cvf scipy-0.9.tar scipy-0.9</p>
<p>11) bzip2 scipy-0.9.tar</p>
<p>12) mv scipy-0.9.tar.bz2 scipy-0.9.spkg</p>
<p>13) cd ../..</p>
<p>14) sage -f scipy-0.9</p>
<p>15) wait for scipy-0.9 to install (cross fingers)</p>
<p>16) start sage (no need for sage -b scipy is a runtime dependency not a build time
one)</p>
<p>17) enjoy scipy-0.9 in sage - hopefully</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22070#post-id-22070I was lazy about trying this but it does not work. scipy 0.9.0 rc needs numpy 1.5.1. The numpy version in sage is older. I might have to do the same with numpyMon, 21 Feb 2011 08:48:13 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22070#post-id-22070Comment by Noah for <p>You can try something very dirty that will probably work. Sage's spkg are stored in spkg/standard. I assume you have a tarball for scipy-0.9. </p>
<p>1) go to spkg/standard</p>
<p>2) tar xvfj scipy-0.8</p>
<p>3) cd scipy-0.8</p>
<p>4) rm -rf src/</p>
<p>5) mkdir src</p>
<p>6) untar the scipy-0.9 tarball</p>
<p>7) copy the content of the scipy-0.9 folder in the src folder</p>
<p>8) going back to spkg/standard</p>
<p>9) mv scipy-0.8 scipy-0.9</p>
<p>10) tar cvf scipy-0.9.tar scipy-0.9</p>
<p>11) bzip2 scipy-0.9.tar</p>
<p>12) mv scipy-0.9.tar.bz2 scipy-0.9.spkg</p>
<p>13) cd ../..</p>
<p>14) sage -f scipy-0.9</p>
<p>15) wait for scipy-0.9 to install (cross fingers)</p>
<p>16) start sage (no need for sage -b scipy is a runtime dependency not a build time
one)</p>
<p>17) enjoy scipy-0.9 in sage - hopefully</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=17760#post-id-17760I built sage 5.9 from source, then applied this procedure to successfully update scipy 0.11 to scipy 0.12 (May 7 2012)Tue, 07 May 2013 05:55:20 -0500http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=17760#post-id-17760Comment by kcrisman for <p>You can try something very dirty that will probably work. Sage's spkg are stored in spkg/standard. I assume you have a tarball for scipy-0.9. </p>
<p>1) go to spkg/standard</p>
<p>2) tar xvfj scipy-0.8</p>
<p>3) cd scipy-0.8</p>
<p>4) rm -rf src/</p>
<p>5) mkdir src</p>
<p>6) untar the scipy-0.9 tarball</p>
<p>7) copy the content of the scipy-0.9 folder in the src folder</p>
<p>8) going back to spkg/standard</p>
<p>9) mv scipy-0.8 scipy-0.9</p>
<p>10) tar cvf scipy-0.9.tar scipy-0.9</p>
<p>11) bzip2 scipy-0.9.tar</p>
<p>12) mv scipy-0.9.tar.bz2 scipy-0.9.spkg</p>
<p>13) cd ../..</p>
<p>14) sage -f scipy-0.9</p>
<p>15) wait for scipy-0.9 to install (cross fingers)</p>
<p>16) start sage (no need for sage -b scipy is a runtime dependency not a build time
one)</p>
<p>17) enjoy scipy-0.9 in sage - hopefully</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22137#post-id-22137And if you try this, let us know if it works, and what platform you are on! That would help with our goal of updating Scipy in the near future.Fri, 11 Feb 2011 05:57:14 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=22137#post-id-22137Answer by flutefreak7 for <p>I am trying to use the "griddata" from "scipy.interpolate". However, the scipy present in scipy is version 0.7 and griddata is implemented 0.9 onwards. Is there a way to upgrade scipy to version 0.9 in sage? I understand that 0.9 is a development version but is there a way to upgrade just scipy to development version?</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12321#post-id-12321I had this problem and was able to use "from matplotlib.mlab import griddata". I'm playing with portable python which appears to have:
matplotlib version 0.98.52
scipy version 0.7.0.dev5180
and numpy version 1.2.1
The matplotlib.mlab version of griddata accepts exactly 5 arguments like this: zi = griddata(x,y,z,xi,yi) and uses delauney nearest neighbor triangulation.
Hope that helps!Wed, 27 Apr 2011 09:37:10 -0500http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12321#post-id-12321Comment by Felix Lawrence for <p>I had this problem and was able to use "from matplotlib.mlab import griddata". I'm playing with portable python which appears to have:</p>
<p>matplotlib version 0.98.52
scipy version 0.7.0.dev5180
and numpy version 1.2.1</p>
<p>The matplotlib.mlab version of griddata accepts exactly 5 arguments like this: zi = griddata(x,y,z,xi,yi) and uses delauney nearest neighbor triangulation.</p>
<p>Hope that helps!</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=21780#post-id-21780@flutefreak7: sage 4.7 is about to be released in the next few days i think (it's currently at release candidate 0), and it includes scipy 0.9 - so hang tight!Wed, 27 Apr 2011 13:09:30 -0500http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?comment=21780#post-id-21780Answer by Jason Grout for <p>I am trying to use the "griddata" from "scipy.interpolate". However, the scipy present in scipy is version 0.7 and griddata is implemented 0.9 onwards. Is there a way to upgrade scipy to version 0.9 in sage? I understand that 0.9 is a development version but is there a way to upgrade just scipy to development version?</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12077#post-id-12077One thing you could try to install a newer scipy is to download scipy and follow the instructions for installation, but instead of doing "python setup.py ...", do "sage -python setup.py ..." (i.e., instead of calling python, call sage -python, which will use Sage's version of python).Tue, 08 Feb 2011 18:25:24 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12077#post-id-12077Answer by DSM for <p>I am trying to use the "griddata" from "scipy.interpolate". However, the scipy present in scipy is version 0.7 and griddata is implemented 0.9 onwards. Is there a way to upgrade scipy to version 0.9 in sage? I understand that 0.9 is a development version but is there a way to upgrade just scipy to development version?</p>
http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12036#post-id-12036You can't upgrade just scipy as it depends upon a later version of numpy, >= 1.4, I think. Good news is that there was a recent sage-devel thread about upgrading numpy, http://groups.google.com/group/sage-devel/browse_thread/thread/9baec937c873dcb7, and I think the report was that the upgrade it only broke a few doctests.
So you can try downloading the tarballs, uncompressing them, and then using sage -python setup.py install. Note that you're going to have to recompile Sage after doing so (lots of warnings about changed size of numpy-related bits).
[*Wait, why aren't you showing a successful use of griddata after upgrading? --ed.* Because I managed to break my Sage install while trying the above, as fftpack in scipy had a build problem, and I didn't have time to sort out what was going on. But hopefully this is just a Mac issue.]Fri, 28 Jan 2011 16:15:32 -0600http://ask.sagemath.org/question/7910/updating-scipy-in-sage/?answer=12036#post-id-12036