sage from command line on windows 10

47 views
Skip to first unread message

Doris Behrendt

unread,
Aug 26, 2020, 3:56:23 AM8/26/20
to sage-...@googlegroups.com

Hi list,

after searching the web for answers without success, I ask here:


What do I have to do to include sage into my environment variables to use sage from command line?


I found this here: https://ask.sagemath.org/question/49071/running-sage-89-from-command-line-windows/

and changed to 9.0 and >Program Files< instead of 8.9 and >Programme<.

C:\Program Files\SageMath 9.0\runtime\bin\bash -l C:/Program Files/SageMath 9.0/runtime/opt/sagemath-9.0/sage


But I could not add this to my path using the windows gui for path editing. I guess because there are two commands not one?

Can anyone help? I'm not so experienced with setting and editing path stuff.

I need this for automating sagetex for arara, by the way.


TIA

doris

Dima Pasechnik

unread,
Aug 26, 2020, 4:43:02 AM8/26/20
to sage-devel
Hi Doris,
On Wed, Aug 26, 2020 at 8:56 AM 'Doris Behrendt' via sage-devel
<sage-...@googlegroups.com> wrote:

> after searching the web for answers without success, I ask here:
>
>
> What do I have to do to include sage into my environment variables to use sage from command line?
>
>
> I found this here: https://ask.sagemath.org/question/49071/running-sage-89-from-command-line-windows/
>
> and changed to 9.0 and >Program Files< instead of 8.9 and >Programme<.
>
> C:\Program Files\SageMath 9.0\runtime\bin\bash -l C:/Program Files/SageMath 9.0/runtime/opt/sagemath-9.0/sage
>
>
> But I could not add this to my path using the windows gui for path editing. I guess because there are two commands not one?

The easiest would be to create a Windows .bat (say, call it
runsage.bat) file which consists of one line

C:\Program Files\SageMath 9.0\runtime\bin\bash -l C:/Program
Files/SageMath 9.0/runtime/opt/sagemath-9.0/sage

and put it somewhere in your Windows path. Then typing runsage (hmm,
or runsage.bat) should launch sage.


HTH
Dima

>
> Can anyone help? I'm not so experienced with setting and editing path stuff.
>
> I need this for automating sagetex for arara, by the way.
>
>
> TIA
>
> doris
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/0f163c27-db6d-47d5-3285-b09c35008918%40me.com.

E. Madison Bray

unread,
Aug 31, 2020, 8:49:26 AM8/31/20
to sage-devel
Out of curiosity why do you want to do this? Sage is a UNIX-based
program and not really designed to work well in the Windows cmd shell,
as you can tell from the ugly colors alone. I also can't promise that
various things like keyboard commands will work well. Is there some
other underlying goal? If so, perhaps there is a better way to achieve
that goal.

I'm not saying you *shouldn't* do it if it's something you really
want. But it isn't technically supported either.
Reply all
Reply to author
Forward
0 new messages