[sage-support] Re: Sage Crash Report: `TypeError` upon startup (Sage 9.0.0)

2020-08-03 Thread Matthias Koeppe
Problems with the Ubuntu packaging should be reported as an Ubuntu bug.

On Sunday, August 2, 2020 at 11:31:57 PM UTC-7, Samuel Tang wrote:
>
> Hi,
>
> Thanks for your quick response. I am running on Ubuntu 20.04, and 
> installed Sagemath via `sudo apt-get install sagemath`.
> From what I recorded, it was Sage 9.0 on Python 3.8.2 since I've installed 
> Ubuntu (in early July The version are consistent on Sage and Python when I 
> referred just now:
>
> ```
> $ sage --version
> SageMath version 9.0, Release Date: 2020-01-01
>
> $ python --version
> Python 3.8.2
> ```
>
> Since I was using Sage in a daily basis in the previous week, so I think 
> I've triggered something lately causing the problem.
> Moreover I found an entry from /var/log/dpkg.log.1 that may cause the 
> problem (unsure about that).
>
> ```
> 2020-07-30 11:52:47 upgrade python3-distupgrade:all 1:20.04.21 1:20.04.23
> 2020-07-30 11:52:47 status half-configured python3-distupgrade:all 
> 1:20.04.21
> 2020-07-30 11:52:47 status unpacked python3-distupgrade:all 1:20.04.21
> 2020-07-30 11:52:47 status half-installed python3-distupgrade:all 
> 1:20.04.21
> 2020-07-30 11:52:48 status unpacked python3-distupgrade:all 1:20.04.23
> ```
>
> Should I downgrade my Python version to see if Sage could start up 
> properly? Thanks much!
> slelievre在 2020年8月3日星期一下午1:57:05 [UTC+8]寫道:
>
>> Le lundi 3 août 2020 05:31:01 UTC+2, Samuel Tang a écrit :
>>>
>>> Hi team,
>>>
>>> This issue happened to me just one day ago.
>>>
>>> I am aware of https://trac.sagemath.org/ticket/18492 and
>>>
>> https://www.mail-archive.com/debian-b...@lists.debian.org/msg1671690.html 
>>> 
>>>
>> as they have the same TypeError, but I think that is not my case.
>>>
>>> Thanks for the help in advance!
>>>
>>
>> Hi Samuel,
>>
>> Did you just install Sage? Probably not or you would have installed
>> either Sage 9.1 or Sage 9.2.beta7.
>>
>> More likely, did you have Sage installed on your computer for a while,
>> via some package manager, and working well, and did you just upgrade
>> the system Python from Python 3.7.x to Python 3.8.x?
>>
>> Python 3.8.x is not supported yet, we're slowly getting there, see:
>>
>> - Sage Trac ticket 27754
>>   Upgrade: Python 3.8.5
>>   https://trac.sagemath.org/ticket/27754
>>
>> For more support, what is your OS and how did you install Sage?
>>
>>

-- 
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/879f29ad-61bf-428b-be67-7712af401720o%40googlegroups.com.


[sage-support] Jupyter kernels for R, gp, gap, etc

2020-08-03 Thread Tim McLarnan
I'm sure this is an uninformed question from an old man who is finally 
accepting that the old SageNB Notebooks are going away, and who is 
excitedly and very belatedly stepping into the new world of Jupyter.

On CoCalc or with the old SageNB Notebooks, there are lots of kernels to 
choose amongst. The Jupyter notebooks in the current OS X binaries only 
offer SageMath and Python kernels.  How does a fairly naive user install 
kernels for R, gp, and gap?  I would have expected them just to be there 
automatically, as they were with the old Notebooks.

I tried copying the kernel folders from CoCalc and editing them in what I 
thought was the right way and putting them with the kernel folders on my 
machine.  This produced kernels that show up in Jupyter, but that don't 
work.  No doubt someone who knows the right things to put in the .json 
files could make this work, but I can't.  This has to be an absurdly 
complicated approach, though.  Surely there's just some trivial thing I 
don't know about.

Apart from writing the occasional function in SageMath, I've never worked 
with Python or Jupyter.

I'd really like to have these kernels available, but I want to run a local 
SageMath installation because of unreliable Internet here in the woods.  I 
can stay with the old Notebooks, but I'd like to be able to grow as 
SageMath does.

--Tim

-- 
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/87a63fbd-deca-4bf1-b112-ffb5825d71d6o%40googlegroups.com.


[sage-support] Re: Jupyter kernels for R, gp, gap, etc

2020-08-03 Thread Nils Bruin
On Monday, August 3, 2020 at 9:26:38 PM UTC-7, Tim McLarnan wrote:
>
> I tried copying the kernel folders from CoCalc and editing them in what I 
> thought was the right way and putting them with the kernel folders on my 
> machine.  This produced kernels that show up in Jupyter, but that don't 
> work.  No doubt someone who knows the right things to put in the .json 
> files could make this work, but I can't.  This has to be an absurdly 
> complicated approach, though.  Surely there's just some trivial thing I 
> don't know about.
>

That got you the configuration of the kernels, but likely not the actual 
code that implements them. Jupyter kernels are basically stand-alone 
programs. Often, they are written in python (but they don't have to be!) 
and installing them consists of two steps: installing the software and 
informing the jupyter notebook installation of their presence.

For kernels written in python, you end up needing to install python 
software, for which there are excellent tools.

A very simple example, that I happen to have written myself, so that's why 
I'm familiar with it, but needs "magma" present on your machine to work.

https://github.com/nbruin/magma_kernel

The instructions indeed show two installation steps: one for installing the 
python package and the other for setting up the jupyter notebook 
registration.

To make extra kernels known to the *sage* jupyter notebook server, you have 
to make sure that you run the configurations in the sage copy of python. 
You'd want to do something like "sage -sh" (on linux or OSX) to get a shell 
that is set up with the sage environment, and run the configurations in 
there.

An alternative is to register the sage kernel with the system-wide jupyter 
notebook. This has the advantage that other kernels that come prepackaged 
with your OS distribution are easier to install (just use your OS tools). 
It has the big disadvantage that currently, rhis is still not a 
straightforward process; it requires some hackery, so I would not recomment 
it as your first experiment.

A big disadvantage of the python ecosystem is that one often end up with 
multiple copies of python living side-by-side on your OS and it's often 
hard to tell which version gets run for what.

-- 
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/6e56fd3d-e424-4573-b3b2-b4aab46b88c0o%40googlegroups.com.


Re: [sage-support] Re: Jupyter kernels for R, gp, gap, etc

2020-08-03 Thread Isuru Fernando
I suggest installing sage through conda.
https://doc.sagemath.org/html/en/installation/conda.html

Conda is a package manager that runs on linux and osx and sagemath is
available as a binary package. There are lots of jupyter kernels
pre-packaged, so it's only a matter of typing,

  conda install sage=9.1 r-irkernel pari_jupyter gap

to get sage, R, gp, gap kernels.

Isuru

On Tue, Aug 4, 2020 at 1:21 AM Nils Bruin  wrote:

> On Monday, August 3, 2020 at 9:26:38 PM UTC-7, Tim McLarnan wrote:
>>
>> I tried copying the kernel folders from CoCalc and editing them in what I
>> thought was the right way and putting them with the kernel folders on my
>> machine.  This produced kernels that show up in Jupyter, but that don't
>> work.  No doubt someone who knows the right things to put in the .json
>> files could make this work, but I can't.  This has to be an absurdly
>> complicated approach, though.  Surely there's just some trivial thing I
>> don't know about.
>>
>
> That got you the configuration of the kernels, but likely not the actual
> code that implements them. Jupyter kernels are basically stand-alone
> programs. Often, they are written in python (but they don't have to be!)
> and installing them consists of two steps: installing the software and
> informing the jupyter notebook installation of their presence.
>
> For kernels written in python, you end up needing to install python
> software, for which there are excellent tools.
>
> A very simple example, that I happen to have written myself, so that's why
> I'm familiar with it, but needs "magma" present on your machine to work.
>
> https://github.com/nbruin/magma_kernel
>
> The instructions indeed show two installation steps: one for installing
> the python package and the other for setting up the jupyter notebook
> registration.
>
> To make extra kernels known to the *sage* jupyter notebook server, you
> have to make sure that you run the configurations in the sage copy of
> python. You'd want to do something like "sage -sh" (on linux or OSX) to get
> a shell that is set up with the sage environment, and run the
> configurations in there.
>
> An alternative is to register the sage kernel with the system-wide jupyter
> notebook. This has the advantage that other kernels that come prepackaged
> with your OS distribution are easier to install (just use your OS tools).
> It has the big disadvantage that currently, rhis is still not a
> straightforward process; it requires some hackery, so I would not recomment
> it as your first experiment.
>
> A big disadvantage of the python ecosystem is that one often end up with
> multiple copies of python living side-by-side on your OS and it's often
> hard to tell which version gets run for what.
>
> --
> 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/6e56fd3d-e424-4573-b3b2-b4aab46b88c0o%40googlegroups.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/CA%2B01voNYZSFW4m%3DquvHY12w7Vc3KYGJCwKJ%2BbTFY6LVL6i9jag%40mail.gmail.com.