Re: [sage-support] Using Cadabra2

2021-03-13 Thread Henri Girard

Yes sorry you are right

Henri

Le 13/03/2021 à 13:35, Kasper Peeters a écrit :


>    %display latex

>   from cadabra2 import *

That only uses the Cadabra python module, which means that you do not 
have access to all the Cadabra specific syntax for declaring 
expressions and properties. Nothing wrong with that, but if you want 
the full experience, you need the Cadabra kernel (which in effect 
pre-processes the input before feeding it to Python).


Kasper



On Saturday, 13 March 2021 at 07:04:32 UTC HG wrote:

Thank you very much, I am using next month ubuntu 21.04 an working
with sage 5.2, just install sudo apt install cadabra2 start sage
in jupyter notebook and to display latex at the beginning write
only once  in a cell

%display latex

from cadabra2 import *

from IPython.display import display, Math, Latex

For example :

%display latex
ex=Ex(r"A_{m n} B^{m n}");ex

and voila ! lol

Le 12/03/2021 à 23:51, Kasper Peeters a écrit :

Cadabra author here. On Unix, the Cadabra build/install process
installs a Jupyter kernel, which works with SageMath installed
from the binary distribution (may need some PYTHONPATH setting,
but nothing more). On Windows, the build process using Visual
Studio is relatively simple, but getting everything to see all
required libraries is a never-ending horror story. Maybe someone
on the SageMath team responsible for the Windows port can help
out; I have no resources to properly support Windows.

The alternative is to run the lot in WSL and then install a
binary distribution of Cadabra; that is known to work from
first-hand experience using a non-SageMath Jupyter installation,
but I have no doubt it can be made to work with the one supplied
by SageMath. You can still connect to the Jupyter kernel from
your Windows browser that way.

On Monday, 8 March 2021 at 14:22:57 UTC dim...@gmail.com wrote:

On Mon, Mar 8, 2021 at 7:28 AM 'Daniel Volinski' via
sage-support
 wrote:
>
> Hi Dima,
>
> This is a page in the Cadabra site: Cadabra: use with Jupyter
>
> I just want to calculate some General relativity stuff
using Cadabra on a Jupyter Notebook as shown in their picture.

I'm able to build Cadabra2 in SageMath environment (at sage
--buildsh
prompt, that is)
on Debian Linux. This way it should be possible to use it
with Sage's
Jupyter notebook.

But on Windows, well, probably much harder...


>
> Thanks,
>
> Daniel Volinski
>
>
>
>
> En domingo, 7 de marzo de 2021 11:54:22 GMT+2, Dima
Pasechnik  escribió:
>
>
> I must say I don't understand what you mean by "use
Cadabra2 on a Jupyter Notebook", is it even possible?
> The following does not read like it's supported by Cadabra2:
>
https://github.com/kpeeters/cadabra2/tree/master/frontend/web

>
> They have
https://github.com/kpeeters/cadabra2/tree/master/jupyterkernel

> but it's not clear how to use it, whether it's working at
all etc.
> Do they have a working Jupyter kernel, which can be used in
a system Jupyter notebook?
>
> In principle, Sage can use system Jupyter notebook
(although whether it's try on Windows, I don't know)
> So if this is all working there should be no issue.
>
>
> On Sunday, March 7, 2021 at 9:10:54 AM UTC Daniel Volinski
wrote:
>
> Hi Dima,
>
> I asked the same question on the Cadabra support site, they
don't know either.
>
> Daniel Volinski
>
>
>
> En sábado, 6 de marzo de 2021 16:57:24 GMT+2, 'Daniel
Volinski' via sage-support 
escribió:
>
>
> Thank you Dima.
>
> Daniel Volinski
>
>
> En sábado, 6 de marzo de 2021 12:30:27 GMT+2, Dima
Pasechnik  escribió:
>
>
>
>
> On Sat, 6 Mar 2021, 10:23 'Daniel Volinski' via
sage-support,  wrote:
>
> Hi Dima,
>
> Thank you for your reply.
>
> I already have a Python3 installation provided by the
SageMath installation, I can run Python3 programs without
adding anything else.
> I already have a LaTeX installation (MikTex) that I use
with other programs. How do I proceed from here?
>
>
> We don't know how to install Cadabra2.
>
> IMHO this is a question for Cadabra2 people: "I have a
Python3 

Re: [sage-support] Cannot launch SAGE on MacOS BigSur

2021-03-13 Thread Dima Pasechnik
On Sat, Mar 13, 2021 at 2:31 PM sylvain golenia
 wrote:
>
> Thanks much for this advice. I was able to launch sage in a terminal. 
> However, when I try sage -njupyter, here is the answer that I get :
>
> /Users/XXX/opt/miniconda3/envs/sage/bin/sage: line 1094: 
> /Users/XXX/opt/miniconda3/envs/sage/build/bin/sage-site: No such file or 
> directory
>
> /Users/XXX/opt/miniconda3/envs/sage/bin/sage: line 1094: exec: 
> /Users/XXX/opt/miniconda3/envs/sage/build/bin/sage-site: cannot execute: No 
> such file or directory

"sage -n" is a hack.

I'd have tried using conda's jupyter notebook directly (i.e. conda
package notebook)
https://jupyter.org/install
(perhaps it's already installed once sage is installed)

I guess it knows about sage's jupyter kernel, so you can choose the
kernel once you launched notebook.

HTH
Dima

>
>
> Thanks for you help.
>
>
>
>
>
>
> On Fri, 12 Mar 2021 at 23:57, Dima Pasechnik  wrote:
>>
>> Use conda, this is the most reliable solution for macOS:
>> https://doc.sagemath.org/html/en/installation/conda.html
>>
>> On Fri, Mar 12, 2021 at 10:16 PM sylvain golenia
>>  wrote:
>> >
>> > Dear support team,
>> >
>> > I am struggling in launching SAGE on mac BigSur. I have reinstalled 
>> > homebrew and python3 and also opensll. I did the sage -f python3 and still 
>> > had errors. I am not at home with all these manipulations and tried what I 
>> > found on forums but could not go any further. Please find below my log.
>> >
>> > Thanks much for your support.
>> >
>> > Sincerely
>> > Sylvain
>> >
>> > The Jupyter notebook requires ssl, even if you do not use
>> > https. Install the openssl development packages in your system and
>> > then rebuild Python (sage -f python3).
>> >
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > No such file or directory
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: exec: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > cannot execute: No such file or directory
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > No such file or directory
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: exec: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > cannot execute: No such file or directory
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > No such file or directory
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: exec: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > cannot execute: No such file or directory
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > No such file or directory
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: exec: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > cannot execute: No such file or directory
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > No such file or directory
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage: line 
>> > 532: exec: 
>> > /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3: 
>> > cannot execute: No such file or directory
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "sage-support" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to sage-support+unsubscr...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/sage-support/4740438e-a5fe-4b1f-a5fe-7f1d52ec89b4n%40googlegroups.com.
>>
>> --
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "sage-support" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/sage-support/0i9CX1eR2Ek/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> sage-support+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/CAAWYfq1dL5%2B-OLzBBeL%3D6DRVDmA0Tzb3hr1b28Hfgqx-h57v0Q%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-suppo

Re: [sage-support] Using Cadabra2

2021-03-13 Thread Dima Pasechnik
On Sat, Mar 13, 2021 at 3:34 PM Kasper Peeters  wrote:
>
> I am happy to stand corrected, but shouldn't you in that case set 
> `CMAKE_INSTALL_PREFIX` to the empty string? Things get installed into 
> `${DESTDIR}${CMAKE_INSTALL_PREFIX}`. If you do not set 
> `CMAKE_INSTALL_PREFIX`, it defaults to `/usr/local`.

Right, but I don't understand at what point CMAKE_INSTALL_PREFIX has
to be set, and how.
 CMAKE_INSTALL_PREFIX is a "cmake-variable", as opposed to DESTDIR,
which is an environment
variable used in cmake-produced makefiles.
(As I said, I have little understanding of cmake...)

Dima

>
> Kasper
>
> On Saturday, 13 March 2021 at 13:47:43 UTC dim...@gmail.com wrote:
>>
>> On Fri, Mar 12, 2021 at 10:51 PM Kasper Peeters
>>  wrote:
>> >
>> > Cadabra author here. On Unix, the Cadabra build/install process installs a 
>> > Jupyter kernel, which works with SageMath installed from the binary 
>> > distribution (may need some PYTHONPATH setting, but nothing more).
>>
>> It seems that the Jupyter part of Cadabra appends /usr/local to
>> cmake's DESTDIR for a reason I don't understand.
>> A Cadabra bug, maybe? (I don't know enough of cmake to be certain).
>> It least that's what I got when I tried installing Cadabra into SageMath's 
>> venv,
>> which has the convention that the install prefix is /local
>> (with SAGE_ROOT the location of the
>> root of SageMath install); I've set DESTDIR=/local and got
>> (some parts of) Cadabra installed into DESTDIR/usr/local - which is
>> not what's needed.
>>
>> Dima
>>
>> > On Windows, the build process using Visual Studio is relatively simple, 
>> > but getting everything to see all required libraries is a never-ending 
>> > horror story. Maybe someone on the SageMath team responsible for the 
>> > Windows port can help out; I have no resources to properly support Windows.
>> >
>> > The alternative is to run the lot in WSL and then install a binary 
>> > distribution of Cadabra; that is known to work from first-hand experience 
>> > using a non-SageMath Jupyter installation, but I have no doubt it can be 
>> > made to work with the one supplied by SageMath. You can still connect to 
>> > the Jupyter kernel from your Windows browser that way.
>> >
>> > On Monday, 8 March 2021 at 14:22:57 UTC dim...@gmail.com wrote:
>> >>
>> >> On Mon, Mar 8, 2021 at 7:28 AM 'Daniel Volinski' via sage-support
>> >>  wrote:
>> >> >
>> >> > Hi Dima,
>> >> >
>> >> > This is a page in the Cadabra site: Cadabra: use with Jupyter
>> >> >
>> >> > I just want to calculate some General relativity stuff using Cadabra on 
>> >> > a Jupyter Notebook as shown in their picture.
>> >>
>> >> I'm able to build Cadabra2 in SageMath environment (at sage --buildsh
>> >> prompt, that is)
>> >> on Debian Linux. This way it should be possible to use it with Sage's
>> >> Jupyter notebook.
>> >>
>> >> But on Windows, well, probably much harder...
>> >>
>> >>
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Daniel Volinski
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > En domingo, 7 de marzo de 2021 11:54:22 GMT+2, Dima Pasechnik 
>> >> >  escribió:
>> >> >
>> >> >
>> >> > I must say I don't understand what you mean by "use Cadabra2 on a 
>> >> > Jupyter Notebook", is it even possible?
>> >> > The following does not read like it's supported by Cadabra2:
>> >> > https://github.com/kpeeters/cadabra2/tree/master/frontend/web
>> >> >
>> >> > They have https://github.com/kpeeters/cadabra2/tree/master/jupyterkernel
>> >> > but it's not clear how to use it, whether it's working at all etc.
>> >> > Do they have a working Jupyter kernel, which can be used in a system 
>> >> > Jupyter notebook?
>> >> >
>> >> > In principle, Sage can use system Jupyter notebook (although whether 
>> >> > it's try on Windows, I don't know)
>> >> > So if this is all working there should be no issue.
>> >> >
>> >> >
>> >> > On Sunday, March 7, 2021 at 9:10:54 AM UTC Daniel Volinski wrote:
>> >> >
>> >> > Hi Dima,
>> >> >
>> >> > I asked the same question on the Cadabra support site, they don't know 
>> >> > either.
>> >> >
>> >> > Daniel Volinski
>> >> >
>> >> >
>> >> >
>> >> > En sábado, 6 de marzo de 2021 16:57:24 GMT+2, 'Daniel Volinski' via 
>> >> > sage-support  escribió:
>> >> >
>> >> >
>> >> > Thank you Dima.
>> >> >
>> >> > Daniel Volinski
>> >> >
>> >> >
>> >> > En sábado, 6 de marzo de 2021 12:30:27 GMT+2, Dima Pasechnik 
>> >> >  escribió:
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > On Sat, 6 Mar 2021, 10:23 'Daniel Volinski' via sage-support, 
>> >> >  wrote:
>> >> >
>> >> > Hi Dima,
>> >> >
>> >> > Thank you for your reply.
>> >> >
>> >> > I already have a Python3 installation provided by the SageMath 
>> >> > installation, I can run Python3 programs without adding anything else.
>> >> > I already have a LaTeX installation (MikTex) that I use with other 
>> >> > programs. How do I proceed from here?
>> >> >
>> >> >
>> >> > We don't know how to install Cadabra2.
>> >> >
>> >> > IMHO this is a question for Cadabra2 people: "I have a Python3 
>> >> > instal

Re: [sage-support] Using Cadabra2

2021-03-13 Thread Kasper Peeters
I am happy to stand corrected, but shouldn't you in that case set 
`CMAKE_INSTALL_PREFIX` to the empty string? Things get installed into 
`${DESTDIR}${CMAKE_INSTALL_PREFIX}`. If you do not set 
`CMAKE_INSTALL_PREFIX`, it defaults to `/usr/local`.

Kasper

On Saturday, 13 March 2021 at 13:47:43 UTC dim...@gmail.com wrote:

> On Fri, Mar 12, 2021 at 10:51 PM Kasper Peeters
>  wrote:
> >
> > Cadabra author here. On Unix, the Cadabra build/install process installs 
> a Jupyter kernel, which works with SageMath installed from the binary 
> distribution (may need some PYTHONPATH setting, but nothing more).
>
> It seems that the Jupyter part of Cadabra appends /usr/local to
> cmake's DESTDIR for a reason I don't understand.
> A Cadabra bug, maybe? (I don't know enough of cmake to be certain).
> It least that's what I got when I tried installing Cadabra into SageMath's 
> venv,
> which has the convention that the install prefix is /local
> (with SAGE_ROOT the location of the
> root of SageMath install); I've set DESTDIR=/local and got
> (some parts of) Cadabra installed into DESTDIR/usr/local - which is
> not what's needed.
>
> Dima
>
> > On Windows, the build process using Visual Studio is relatively simple, 
> but getting everything to see all required libraries is a never-ending 
> horror story. Maybe someone on the SageMath team responsible for the 
> Windows port can help out; I have no resources to properly support Windows.
> >
> > The alternative is to run the lot in WSL and then install a binary 
> distribution of Cadabra; that is known to work from first-hand experience 
> using a non-SageMath Jupyter installation, but I have no doubt it can be 
> made to work with the one supplied by SageMath. You can still connect to 
> the Jupyter kernel from your Windows browser that way.
> >
> > On Monday, 8 March 2021 at 14:22:57 UTC dim...@gmail.com wrote:
> >>
> >> On Mon, Mar 8, 2021 at 7:28 AM 'Daniel Volinski' via sage-support
> >>  wrote:
> >> >
> >> > Hi Dima,
> >> >
> >> > This is a page in the Cadabra site: Cadabra: use with Jupyter
> >> >
> >> > I just want to calculate some General relativity stuff using Cadabra 
> on a Jupyter Notebook as shown in their picture.
> >>
> >> I'm able to build Cadabra2 in SageMath environment (at sage --buildsh
> >> prompt, that is)
> >> on Debian Linux. This way it should be possible to use it with Sage's
> >> Jupyter notebook.
> >>
> >> But on Windows, well, probably much harder...
> >>
> >>
> >> >
> >> > Thanks,
> >> >
> >> > Daniel Volinski
> >> >
> >> >
> >> >
> >> >
> >> > En domingo, 7 de marzo de 2021 11:54:22 GMT+2, Dima Pasechnik <
> dim...@gmail.com> escribió:
> >> >
> >> >
> >> > I must say I don't understand what you mean by "use Cadabra2 on a 
> Jupyter Notebook", is it even possible?
> >> > The following does not read like it's supported by Cadabra2:
> >> > https://github.com/kpeeters/cadabra2/tree/master/frontend/web
> >> >
> >> > They have 
> https://github.com/kpeeters/cadabra2/tree/master/jupyterkernel
> >> > but it's not clear how to use it, whether it's working at all etc.
> >> > Do they have a working Jupyter kernel, which can be used in a system 
> Jupyter notebook?
> >> >
> >> > In principle, Sage can use system Jupyter notebook (although whether 
> it's try on Windows, I don't know)
> >> > So if this is all working there should be no issue.
> >> >
> >> >
> >> > On Sunday, March 7, 2021 at 9:10:54 AM UTC Daniel Volinski wrote:
> >> >
> >> > Hi Dima,
> >> >
> >> > I asked the same question on the Cadabra support site, they don't 
> know either.
> >> >
> >> > Daniel Volinski
> >> >
> >> >
> >> >
> >> > En sábado, 6 de marzo de 2021 16:57:24 GMT+2, 'Daniel Volinski' via 
> sage-support  escribió:
> >> >
> >> >
> >> > Thank you Dima.
> >> >
> >> > Daniel Volinski
> >> >
> >> >
> >> > En sábado, 6 de marzo de 2021 12:30:27 GMT+2, Dima Pasechnik <
> dim...@gmail.com> escribió:
> >> >
> >> >
> >> >
> >> >
> >> > On Sat, 6 Mar 2021, 10:23 'Daniel Volinski' via sage-support, <
> sage-s...@googlegroups.com> wrote:
> >> >
> >> > Hi Dima,
> >> >
> >> > Thank you for your reply.
> >> >
> >> > I already have a Python3 installation provided by the SageMath 
> installation, I can run Python3 programs without adding anything else.
> >> > I already have a LaTeX installation (MikTex) that I use with other 
> programs. How do I proceed from here?
> >> >
> >> >
> >> > We don't know how to install Cadabra2.
> >> >
> >> > IMHO this is a question for Cadabra2 people: "I have a Python3 
> installation, and I want to run Cadabra2 on top of it".
> >> >
> >> >
> >> > Thanks,
> >> >
> >> > Daniel Volinski
> >> >
> >> >
> >> >
> >> >
> >> > En viernes, 5 de marzo de 2021 22:49:40 GMT+2, Dima Pasechnik <
> dim...@gmail.com> escribió:
> >> >
> >> >
> >> > On Fri, Mar 5, 2021 at 8:42 PM 'Daniel Volinski' via sage-support
> >> >  wrote:
> >> > >
> >> > > Hi All,
> >> > >
> >> > > I'm using SageMath 9.2 on Windows 10 Native with Jupyter Notebook.
> >> > >
> >> > > My question, is there

Re: [sage-support] Cannot launch SAGE on MacOS BigSur

2021-03-13 Thread sylvain golenia
Thanks much for this advice. I was able to launch sage in a terminal.
However, when I try sage -njupyter, here is the answer that I get :

/Users/XXX/opt/miniconda3/envs/sage/bin/sage: line 1094:
/Users/XXX/opt/miniconda3/envs/sage/build/bin/sage-site: No such file or
directory

/Users/XXX/opt/miniconda3/envs/sage/bin/sage: line 1094: exec:
/Users/XXX/opt/miniconda3/envs/sage/build/bin/sage-site: cannot execute: No
such file or directory


Thanks for you help.






On Fri, 12 Mar 2021 at 23:57, Dima Pasechnik  wrote:

> Use conda, this is the most reliable solution for macOS:
> https://doc.sagemath.org/html/en/installation/conda.html
>
> On Fri, Mar 12, 2021 at 10:16 PM sylvain golenia
>  wrote:
> >
> > Dear support team,
> >
> > I am struggling in launching SAGE on mac BigSur. I have reinstalled
> homebrew and python3 and also opensll. I did the sage -f python3 and still
> had errors. I am not at home with all these manipulations and tried what I
> found on forums but could not go any further. Please find below my log.
> >
> > Thanks much for your support.
> >
> > Sincerely
> > Sylvain
> >
> > The Jupyter notebook requires ssl, even if you do not use
> > https. Install the openssl development packages in your system and
> > then rebuild Python (sage -f python3).
> >
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> No such file or directory
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532: exec:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> cannot execute: No such file or directory
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> No such file or directory
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532: exec:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> cannot execute: No such file or directory
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> No such file or directory
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532: exec:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> cannot execute: No such file or directory
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> No such file or directory
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532: exec:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> cannot execute: No such file or directory
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> No such file or directory
> > /Applications/SageMath-9.2.app/Contents/Resources/sage/src/bin/sage:
> line 532: exec:
> /Applications/SageMath-9.2.app/Contents/Resources/sage/local/bin/python3:
> cannot execute: No such file or directory
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "sage-support" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to sage-support+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/4740438e-a5fe-4b1f-a5fe-7f1d52ec89b4n%40googlegroups.com
> .
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-support/0i9CX1eR2Ek/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/CAAWYfq1dL5%2B-OLzBBeL%3D6DRVDmA0Tzb3hr1b28Hfgqx-h57v0Q%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACRXk%2B4dXY9qcyp-zzWmL1iTiipFw5wi3ffuspsQ6%3D%2BGjyquTA%40mail.gmail.com.


Re: [sage-support] Using Cadabra2

2021-03-13 Thread Dima Pasechnik
On Fri, Mar 12, 2021 at 10:51 PM Kasper Peeters
 wrote:
>
> Cadabra author here. On Unix, the Cadabra build/install process installs a 
> Jupyter kernel, which works with SageMath installed from the binary 
> distribution (may need some PYTHONPATH setting, but nothing more).

It seems that the Jupyter part of Cadabra appends /usr/local to
cmake's DESTDIR for a reason I don't understand.
A Cadabra bug, maybe? (I don't know enough of cmake to be certain).
It least that's what I got when I tried installing Cadabra into SageMath's venv,
which has the convention that the install prefix is /local
(with SAGE_ROOT the location of the
root of SageMath install); I've set DESTDIR=/local and got
(some parts of) Cadabra installed into DESTDIR/usr/local - which is
not what's needed.

Dima

> On Windows, the build process using Visual Studio is relatively simple, but 
> getting everything to see all required libraries is a never-ending horror 
> story. Maybe someone on the SageMath team responsible for the Windows port 
> can help out; I have no resources to properly support Windows.
>
> The alternative is to run the lot in WSL and then install a binary 
> distribution of Cadabra; that is known to work from first-hand experience 
> using a non-SageMath Jupyter installation, but I have no doubt it can be made 
> to work with the one supplied by SageMath. You can still connect to the 
> Jupyter kernel from your Windows browser that way.
>
> On Monday, 8 March 2021 at 14:22:57 UTC dim...@gmail.com wrote:
>>
>> On Mon, Mar 8, 2021 at 7:28 AM 'Daniel Volinski' via sage-support
>>  wrote:
>> >
>> > Hi Dima,
>> >
>> > This is a page in the Cadabra site: Cadabra: use with Jupyter
>> >
>> > I just want to calculate some General relativity stuff using Cadabra on a 
>> > Jupyter Notebook as shown in their picture.
>>
>> I'm able to build Cadabra2 in SageMath environment (at sage --buildsh
>> prompt, that is)
>> on Debian Linux. This way it should be possible to use it with Sage's
>> Jupyter notebook.
>>
>> But on Windows, well, probably much harder...
>>
>>
>> >
>> > Thanks,
>> >
>> > Daniel Volinski
>> >
>> >
>> >
>> >
>> > En domingo, 7 de marzo de 2021 11:54:22 GMT+2, Dima Pasechnik 
>> >  escribió:
>> >
>> >
>> > I must say I don't understand what you mean by "use Cadabra2 on a Jupyter 
>> > Notebook", is it even possible?
>> > The following does not read like it's supported by Cadabra2:
>> > https://github.com/kpeeters/cadabra2/tree/master/frontend/web
>> >
>> > They have https://github.com/kpeeters/cadabra2/tree/master/jupyterkernel
>> > but it's not clear how to use it, whether it's working at all etc.
>> > Do they have a working Jupyter kernel, which can be used in a system 
>> > Jupyter notebook?
>> >
>> > In principle, Sage can use system Jupyter notebook (although whether it's 
>> > try on Windows, I don't know)
>> > So if this is all working there should be no issue.
>> >
>> >
>> > On Sunday, March 7, 2021 at 9:10:54 AM UTC Daniel Volinski wrote:
>> >
>> > Hi Dima,
>> >
>> > I asked the same question on the Cadabra support site, they don't know 
>> > either.
>> >
>> > Daniel Volinski
>> >
>> >
>> >
>> > En sábado, 6 de marzo de 2021 16:57:24 GMT+2, 'Daniel Volinski' via 
>> > sage-support  escribió:
>> >
>> >
>> > Thank you Dima.
>> >
>> > Daniel Volinski
>> >
>> >
>> > En sábado, 6 de marzo de 2021 12:30:27 GMT+2, Dima Pasechnik 
>> >  escribió:
>> >
>> >
>> >
>> >
>> > On Sat, 6 Mar 2021, 10:23 'Daniel Volinski' via sage-support, 
>> >  wrote:
>> >
>> > Hi Dima,
>> >
>> > Thank you for your reply.
>> >
>> > I already have a Python3 installation provided by the SageMath 
>> > installation, I can run Python3 programs without adding anything else.
>> > I already have a LaTeX installation (MikTex) that I use with other 
>> > programs. How do I proceed from here?
>> >
>> >
>> > We don't know how to install Cadabra2.
>> >
>> > IMHO this is a question for Cadabra2 people: "I have a Python3 
>> > installation, and I want to run Cadabra2 on top of it".
>> >
>> >
>> > Thanks,
>> >
>> > Daniel Volinski
>> >
>> >
>> >
>> >
>> > En viernes, 5 de marzo de 2021 22:49:40 GMT+2, Dima Pasechnik 
>> >  escribió:
>> >
>> >
>> > On Fri, Mar 5, 2021 at 8:42 PM 'Daniel Volinski' via sage-support
>> >  wrote:
>> > >
>> > > Hi All,
>> > >
>> > > I'm using SageMath 9.2 on Windows 10 Native with Jupyter Notebook.
>> > >
>> > > My question, is there any way to use Cadabra2 on a Jupyter Notebook 
>> > > after installing SageMath?
>> > >
>> > > I do not want to install conda or anaconda or miniconda, I just want to 
>> > > use Cadabra2 in the Jupyter Notebook provided by the SageMath 
>> > > installation and may be with minimal installation of some software.
>> >
>> > From https://cadabra.science/download.html:
>> > Windows 10
>> > You will need a Python3 installation from Anaconda (64-bits, Python
>> > 3.8) and a LaTeX installation (tested with MikTeX, others may work
>> > too) in order for this to work. Install those first if you do not have
>> 

Re: [sage-support] Using Cadabra2

2021-03-13 Thread Kasper Peeters


>%display latex
>   from cadabra2 import *

That only uses the Cadabra python module, which means that you do not have 
access to all the Cadabra specific syntax for declaring expressions and 
properties. Nothing wrong with that, but if you want the full experience, 
you need the Cadabra kernel (which in effect pre-processes the input before 
feeding it to Python).

Kasper



On Saturday, 13 March 2021 at 07:04:32 UTC HG wrote:

> Thank you very much, I am using next month ubuntu 21.04 an working with 
> sage 5.2, just install sudo apt install cadabra2 start sage in jupyter 
> notebook and to display latex at the beginning write only once  in a cell 
>
> %display latex
>
> from cadabra2 import *
>
> from IPython.display import display, Math, Latex
>
> For example :
>
> %display latex
> ex=Ex(r"A_{m n} B^{m n}");ex
>
> and voila ! lol
> Le 12/03/2021 à 23:51, Kasper Peeters a écrit :
>
> Cadabra author here. On Unix, the Cadabra build/install process installs a 
> Jupyter kernel, which works with SageMath installed from the binary 
> distribution (may need some PYTHONPATH setting, but nothing more). On 
> Windows, the build process using Visual Studio is relatively simple, but 
> getting everything to see all required libraries is a never-ending horror 
> story. Maybe someone on the SageMath team responsible for the Windows port 
> can help out; I have no resources to properly support Windows.
>
> The alternative is to run the lot in WSL and then install a binary 
> distribution of Cadabra; that is known to work from first-hand experience 
> using a non-SageMath Jupyter installation, but I have no doubt it can be 
> made to work with the one supplied by SageMath. You can still connect to 
> the Jupyter kernel from your Windows browser that way.
>
> On Monday, 8 March 2021 at 14:22:57 UTC dim...@gmail.com wrote:
>
>> On Mon, Mar 8, 2021 at 7:28 AM 'Daniel Volinski' via sage-support 
>>  wrote: 
>> > 
>> > Hi Dima, 
>> > 
>> > This is a page in the Cadabra site: Cadabra: use with Jupyter 
>> > 
>> > I just want to calculate some General relativity stuff using Cadabra on 
>> a Jupyter Notebook as shown in their picture. 
>>
>> I'm able to build Cadabra2 in SageMath environment (at sage --buildsh 
>> prompt, that is) 
>> on Debian Linux. This way it should be possible to use it with Sage's 
>> Jupyter notebook. 
>>
>> But on Windows, well, probably much harder... 
>>
>>
>> > 
>> > Thanks, 
>> > 
>> > Daniel Volinski 
>> > 
>> > 
>> > 
>> > 
>> > En domingo, 7 de marzo de 2021 11:54:22 GMT+2, Dima Pasechnik <
>> dim...@gmail.com> escribió: 
>> > 
>> > 
>> > I must say I don't understand what you mean by "use Cadabra2 on a 
>> Jupyter Notebook", is it even possible? 
>> > The following does not read like it's supported by Cadabra2: 
>> > https://github.com/kpeeters/cadabra2/tree/master/frontend/web 
>> > 
>> > They have 
>> https://github.com/kpeeters/cadabra2/tree/master/jupyterkernel 
>> > but it's not clear how to use it, whether it's working at all etc. 
>> > Do they have a working Jupyter kernel, which can be used in a system 
>> Jupyter notebook? 
>> > 
>> > In principle, Sage can use system Jupyter notebook (although whether 
>> it's try on Windows, I don't know) 
>> > So if this is all working there should be no issue. 
>> > 
>> > 
>> > On Sunday, March 7, 2021 at 9:10:54 AM UTC Daniel Volinski wrote: 
>> > 
>> > Hi Dima, 
>> > 
>> > I asked the same question on the Cadabra support site, they don't know 
>> either. 
>> > 
>> > Daniel Volinski 
>> > 
>> > 
>> > 
>> > En sábado, 6 de marzo de 2021 16:57:24 GMT+2, 'Daniel Volinski' via 
>> sage-support  escribió: 
>> > 
>> > 
>> > Thank you Dima. 
>> > 
>> > Daniel Volinski 
>> > 
>> > 
>> > En sábado, 6 de marzo de 2021 12:30:27 GMT+2, Dima Pasechnik <
>> dim...@gmail.com> escribió: 
>> > 
>> > 
>> > 
>> > 
>> > On Sat, 6 Mar 2021, 10:23 'Daniel Volinski' via sage-support, <
>> sage-s...@googlegroups.com> wrote: 
>> > 
>> > Hi Dima, 
>> > 
>> > Thank you for your reply. 
>> > 
>> > I already have a Python3 installation provided by the SageMath 
>> installation, I can run Python3 programs without adding anything else. 
>> > I already have a LaTeX installation (MikTex) that I use with other 
>> programs. How do I proceed from here? 
>> > 
>> > 
>> > We don't know how to install Cadabra2. 
>> > 
>> > IMHO this is a question for Cadabra2 people: "I have a Python3 
>> installation, and I want to run Cadabra2 on top of it". 
>> > 
>> > 
>> > Thanks, 
>> > 
>> > Daniel Volinski 
>> > 
>> > 
>> > 
>> > 
>> > En viernes, 5 de marzo de 2021 22:49:40 GMT+2, Dima Pasechnik <
>> dim...@gmail.com> escribió: 
>> > 
>> > 
>> > On Fri, Mar 5, 2021 at 8:42 PM 'Daniel Volinski' via sage-support 
>> >  wrote: 
>> > > 
>> > > Hi All, 
>> > > 
>> > > I'm using SageMath 9.2 on Windows 10 Native with Jupyter Notebook. 
>> > > 
>> > > My question, is there any way to use Cadabra2 on a Jupyter Notebook 
>> after installing SageMath? 
>> > > 
>> > > I do not want to install con

Re: [sage-support] Using Cadabra2

2021-03-13 Thread 'Daniel Volinski' via sage-support
 Hi All,
Is it possible to "translate" all that to Windows 10?
Thanks,
Daniel Volinski
En sábado, 13 de marzo de 2021 09:04:30 GMT+2, Henri Girard 
 escribió:  
 
  
Thank you very much, I am using next month ubuntu 21.04 an working with sage 
5.2, just install sudo apt install cadabra2 start sage in jupyter notebook and 
to display latex at the beginning write only once  in a cell 
 
 
%display latex
 
from cadabra2 import *
 
 
from IPython.display import display, Math, Latex
 
For example :
 
%display latex
 ex=Ex(r"A_{m n} B^{m n}");ex
 

  
and voila ! lol
 
 Le 12/03/2021 à 23:51, Kasper Peeters a écrit :
  
 
Cadabra author here. On Unix, the Cadabra build/install process installs a 
Jupyter kernel, which works with SageMath installed from the binary 
distribution (may need some PYTHONPATH setting, but nothing more). On Windows, 
the build process using Visual Studio is relatively simple, but getting 
everything to see all required libraries is a never-ending horror story. Maybe 
someone on the SageMath team responsible for the Windows port can help out; I 
have no resources to properly support Windows.
  
  The alternative is to run the lot in WSL and then install a binary 
distribution of Cadabra; that is known to work from first-hand experience using 
a non-SageMath Jupyter installation, but I have no doubt it can be made to work 
with the one supplied by SageMath. You can still connect to the Jupyter kernel 
from your Windows browser that way.
  
  On Monday, 8 March 2021 at 14:22:57 UTC dim...@gmail.com wrote:
  
On Mon, Mar 8, 2021 at 7:28 AM 'Daniel Volinski' via sage-support 
  wrote: 
 > 
 > Hi Dima, 
 > 
 > This is a page in the Cadabra site: Cadabra: use with Jupyter 
 > 
 > I just want to calculate some General relativity stuff using Cadabra on a 
 > Jupyter Notebook as shown in their picture. 
 
 I'm able to build Cadabra2 in SageMath environment (at sage --buildsh 
 prompt, that is) 
 on Debian Linux. This way it should be possible to use it with Sage's 
 Jupyter notebook. 
 
 But on Windows, well, probably much harder... 
 
 
 > 
 > Thanks, 
 > 
 > Daniel Volinski 
 > 
 > 
 > 
 > 
 > En domingo, 7 de marzo de 2021 11:54:22 GMT+2, Dima Pasechnik 
 >  escribió: 
 > 
 > 
 > I must say I don't understand what you mean by "use Cadabra2 on a Jupyter 
 > Notebook", is it even possible? 
 > The following does not read like it's supported by Cadabra2: 
 > https://github.com/kpeeters/cadabra2/tree/master/frontend/web 
 > 
 > They have https://github.com/kpeeters/cadabra2/tree/master/jupyterkernel 
 > but it's not clear how to use it, whether it's working at all etc. 
 > Do they have a working Jupyter kernel, which can be used in a system Jupyter 
 > notebook? 
 > 
 > In principle, Sage can use system Jupyter notebook (although whether it's 
 > try on Windows, I don't know) 
 > So if this is all working there should be no issue. 
 > 
 > 
 > On Sunday, March 7, 2021 at 9:10:54 AM UTC Daniel Volinski wrote: 
 > 
 > Hi Dima, 
 > 
 > I asked the same question on the Cadabra support site, they don't know 
 > either. 
 > 
 > Daniel Volinski 
 > 
 > 
 > 
 > En sábado, 6 de marzo de 2021 16:57:24 GMT+2, 'Daniel Volinski' via 
 > sage-support  escribió: 
 > 
 > 
 > Thank you Dima. 
 > 
 > Daniel Volinski 
 > 
 > 
 > En sábado, 6 de marzo de 2021 12:30:27 GMT+2, Dima Pasechnik 
 >  escribió: 
 > 
 > 
 > 
 > 
 > On Sat, 6 Mar 2021, 10:23 'Daniel Volinski' via sage-support, 
 >  wrote: 
 > 
 > Hi Dima, 
 > 
 > Thank you for your reply. 
 > 
 > I already have a Python3 installation provided by the SageMath installation, 
 > I can run Python3 programs without adding anything else. 
 > I already have a LaTeX installation (MikTex) that I use with other programs. 
 > How do I proceed from here? 
 > 
 > 
 > We don't know how to install Cadabra2. 
 > 
 > IMHO this is a question for Cadabra2 people: "I have a Python3 installation, 
 > and I want to run Cadabra2 on top of it". 
 > 
 > 
 > Thanks, 
 > 
 > Daniel Volinski 
 > 
 > 
 > 
 > 
 > En viernes, 5 de marzo de 2021 22:49:40 GMT+2, Dima Pasechnik 
 >  escribió: 
 > 
 > 
 > On Fri, Mar 5, 2021 at 8:42 PM 'Daniel Volinski' via sage-support 
 >  wrote: 
 > > 
 > > Hi All, 
 > > 
 > > I'm using SageMath 9.2 on Windows 10 Native with Jupyter Notebook. 
 > > 
 > > My question, is there any way to use Cadabra2 on a Jupyter Notebook after 
 > > installing SageMath? 
 > > 
 > > I do not want to install conda or anaconda or miniconda, I just want to 
 > > use Cadabra2 in the Jupyter Notebook provided by the SageMath installation 
 > > and may be with minimal installation of some software. 
 > 
 > From https://cadabra.science/download.html: 
 > Windows 10 
 > You will need a Python3 installation from Anaconda (64-bits, Python 
 > 3.8) and a LaTeX installation (tested with MikTeX, others may work 
 > too) in order for this to work. Install those first if you do not have 
 > them already. The Windows port and this binary installer are in beta 
 > right now, please report