[sage-support] Re: Installing SAGE alongside existing Python installation
On Dec 14, 10:56 pm, Simon King wrote: > Hi Emil! > > On 14 Dez., 23:20, emil wrote: > > > Could you give an example of how to use install_scripts to make e.g. > > python or R available from outside sage? > > For example: I have a directory bin/ in my home directory, that also > is in my PATH. Once upon a time, I did > sage: install_scripts('~/bin/') > > In principle, you could name any directory to which you have write > permission. In that directory, Sage creates a couple of scripts: gap > gp hg ipython maxima mwrank R singular > > There is not much magic in the scripts. For example, the "gap" script > is > #!/bin/sh > sage -gap $* > > Hence, if I do > gap > in a shell, then in fact "sage -gap" is executed; so, it uses the gap > shipped by Sage, but it doesn't start Sage. > > Apparently the scripts don't need to change if the Sage-gap, - > singular, -gp,... versions change. Hence, when I say "once upon a > time", it was really only *once*. > > Remark: You ask if it is possible to make "python or R" available. I > don't know if it is possible to ask the install_scripts function to > *only* install python and R but nothing else. Also I notice that there > is no script called "python" in the list above; but it would of course > be easy to write such script. > > > And it is somehow related to another post here > > ...http://groups.google.com/group/sage-support/browse_thread/thread/b3e9... > > Sorry, that post is beyond my knowledge. I even don't know if it is > related. > > Cheers, > Simon Hello Simon, thank you very much for this explanation. I think this is a very nice feature and this should be made more visible when promoting sage. Also I found your explanation more helpful than the tutorial, maybe this text can be replaced :-) At least I have struggled to build various tools on a Linux installation, and it takes a lot of time to get R, Maxima, Python with libraries working correctly. And this already exists in Sage, well tested and stable! That could save a lot of time for many people. emil -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Installing SAGE alongside existing Python installation
Hi Emil! On 14 Dez., 23:20, emil wrote: > Could you give an example of how to use install_scripts to make e.g. > python or R available from outside sage? For example: I have a directory bin/ in my home directory, that also is in my PATH. Once upon a time, I did sage: install_scripts('~/bin/') In principle, you could name any directory to which you have write permission. In that directory, Sage creates a couple of scripts: gap gp hg ipython maxima mwrank R singular There is not much magic in the scripts. For example, the "gap" script is #!/bin/sh sage -gap $* Hence, if I do gap in a shell, then in fact "sage -gap" is executed; so, it uses the gap shipped by Sage, but it doesn't start Sage. Apparently the scripts don't need to change if the Sage-gap, - singular, -gp,... versions change. Hence, when I say "once upon a time", it was really only *once*. Remark: You ask if it is possible to make "python or R" available. I don't know if it is possible to ask the install_scripts function to *only* install python and R but nothing else. Also I notice that there is no script called "python" in the list above; but it would of course be easy to write such script. > And it is somehow related to another post here > ...http://groups.google.com/group/sage-support/browse_thread/thread/b3e9... Sorry, that post is beyond my knowledge. I even don't know if it is related. Cheers, Simon -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Installing SAGE alongside existing Python installation
On Dec 14, 7:41 pm, Simon King wrote: > Hi, > > On 14 Dez., 17:07, emil wrote: > > > Is it an idea to do it the other way around? Make symlink to the > > python which is contained in sage to use it from outside? > > I think that functionality is provided by the command > "install_scripts". > > Cheers, > Simon Could you give an example of how to use install_scripts to make e.g. python or R available from outside sage? I looked at http://www.sagemath.org/doc/reference/sage/misc/dist.html but somehow the usage is not clear to me? I also ask because i think this would be a very interesting feature. And it is somehow related to another post here ... http://groups.google.com/group/sage-support/browse_thread/thread/b3e97ed22b3eddd4 emil -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Installing SAGE alongside existing Python installation
Hi, On 14 Dez., 17:07, emil wrote: > Is it an idea to do it the other way around? Make symlink to the > python which is contained in sage to use it from outside? I think that functionality is provided by the command "install_scripts". Cheers, Simon -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Installing SAGE alongside existing Python installation
On Dec 12, 9:30 pm, Juanlu_001 wrote: > Hmm, you are right, I might break something if I don't stuck in 2.6... > All right, thank you very much anyway. > > On Dec 12, 3:57 pm, Harald Schilly wrote: > > > On Sunday, December 12, 2010 3:49:33 PM UTC+1, Juanlu_001 wrote:Is > > > there any way to accomplish what I'm asking? I do not fear the > > shell or source code. > > > It's possible and done for some linux distributions, but I don't think > > it's a good idea for you. You can look into Sage's local/lib/python2.6 > > folder, where you can see that you can only save about 40MB (all the > > rest is in the site packages which are part of sage anyways). Also, > > Sage is only tested to work well with the given python version. That > > might not be true for other ones, because some libs directly access > > python internal datastructures that might be subject to changes and so > > on. Rather, you could go the other way round and use "sage -python" as > > your python interpreter or work inside the "Sage Environment" via $ > > sage -sh ... depending on what you want to accomplish. > > > H Is it an idea to do it the other way around? Make symlink to the python which is contained in sage to use it from outside? Thats how I did in the sage live CD. So you save space and you can use all libraries (numpy, sympy ... ) which are already contained in the sage python. emil -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Installing SAGE alongside existing Python installation
Hmm, you are right, I might break something if I don't stuck in 2.6... All right, thank you very much anyway. On Dec 12, 3:57 pm, Harald Schilly wrote: > On Sunday, December 12, 2010 3:49:33 PM UTC+1, Juanlu_001 wrote:Is > > there any way to accomplish what I'm asking? I do not fear the > shell or source code. > > It's possible and done for some linux distributions, but I don't think > it's a good idea for you. You can look into Sage's local/lib/python2.6 > folder, where you can see that you can only save about 40MB (all the > rest is in the site packages which are part of sage anyways). Also, > Sage is only tested to work well with the given python version. That > might not be true for other ones, because some libs directly access > python internal datastructures that might be subject to changes and so > on. Rather, you could go the other way round and use "sage -python" as > your python interpreter or work inside the "Sage Environment" via $ > sage -sh ... depending on what you want to accomplish. > > H -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Installing SAGE alongside existing Python installation
On Sunday, December 12, 2010 3:49:33 PM UTC+1, Juanlu_001 wrote:Is there any way to accomplish what I'm asking? I do not fear the shell or source code. It's possible and done for some linux distributions, but I don't think it's a good idea for you. You can look into Sage's local/lib/python2.6 folder, where you can see that you can only save about 40MB (all the rest is in the site packages which are part of sage anyways). Also, Sage is only tested to work well with the given python version. That might not be true for other ones, because some libs directly access python internal datastructures that might be subject to changes and so on. Rather, you could go the other way round and use "sage -python" as your python interpreter or work inside the "Sage Environment" via $ sage -sh ... depending on what you want to accomplish. H -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org