For those of us who took the plunge into the Apple M1 danger zone, we know that it's unlikely to be bug-free regarding application code that depends on set assumptions about environment behavior. One such bug that will likely see a fix soon in the main branch of Jupyter in short order is the Juptyer subsystem responsible for handling event callbacks from the front-end. Fortunately, the fix is relatively minimal and involves updating the assumptions whether or not the context of which Jupyter is running in a WX compatible context (I believe this to mean as a GUI application or not).
The problem that causes the restart in the kernel is a set of states that must be established for the Kernel to run properly, but are never set due to the check for the WX environment not cleanly being handled given the envrionmetnal variables that are reported by M1 vs previous processor architectures on Mac.
With the patch file attached to this gist, apply it to your ~/anaconda3/lib/python3.x/site-packages/ipykernel/eventloops.py)
(x is your version of Python) file.
To apply the patch, assuming you've downloaded the patch to your ~/
home directory, first make a backup of the file referenced above, then use the patch
command to update your file.
cd ~/anaconda3/lib/python3.8/site-packages/ipykernel/
patch -b < ~/m1_fix_5.1.2.event_loops_py.patch