minrk / allthekernels Goto Github PK
View Code? Open in Web Editor NEWA multiplexer kernel for Jupyter
License: MIT License
A multiplexer kernel for Jupyter
License: MIT License
TypeError: _publish_status() takes 2 positional arguments but 3 were given
[I 07:43:11.839 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
c:\users\andy\scoop\apps\python\current\lib\site-packages\allthekernels.py:13: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
ioloop.install()
[AllTheKernelsApp] IPYTHONDIR set to: C:\Users\Andy\.ipython
[AllTheKernelsApp] Using existing profile dir: 'C:\\Users\\Andy\\.ipython\\profile_default'
[AllTheKernelsApp] Searching path ['D:\\MyDocs\\重要文档\\obsidian\\default\\软件开发\\CSharp', 'C:\\Users\\Andy\\.ipython\\profile_default', 'c:\\users\\andy\\scoop\\apps\\python\\current\\etc\\ipython', 'C:\\ProgramData\\ipython'] for config files
[AllTheKernelsApp] Attempting to load config file: ipython_config.py
[AllTheKernelsApp] Looking for ipython_config in C:\ProgramData\ipython
[AllTheKernelsApp] Looking for ipython_config in c:\users\andy\scoop\apps\python\current\etc\ipython
[AllTheKernelsApp] Looking for ipython_config in C:\Users\Andy\.ipython\profile_default
[AllTheKernelsApp] Loaded config file: C:\Users\Andy\.ipython\profile_default\ipython_config.py
[AllTheKernelsApp] Looking for ipython_config in D:\MyDocs\重要文档\obsidian\default\软件开发\CSharp
[AllTheKernelsApp] Attempting to load config file: ipython_kernel_config.py
[AllTheKernelsApp] Looking for ipython_kernel_config in C:\ProgramData\ipython
[AllTheKernelsApp] Looking for ipython_kernel_config in c:\users\andy\scoop\apps\python\current\etc\ipython
[AllTheKernelsApp] Looking for ipython_kernel_config in C:\Users\Andy\.ipython\profile_default
[AllTheKernelsApp] Loaded config file: C:\Users\Andy\.ipython\profile_default\ipython_kernel_config.py
[AllTheKernelsApp] Looking for ipython_kernel_config in D:\MyDocs\重要文档\obsidian\default\软件开发\CSharp
[AllTheKernelsApp] Loading connection file C:\Users\Andy\AppData\Roaming\jupyter\runtime\kernel-41747d7a-f013-462e-90c7-c60924d0736f.json
[AllTheKernelsApp] Starting the kernel at pid: 13772
[AllTheKernelsApp] shell ROUTER Channel on port: 64393
[AllTheKernelsApp] stdin ROUTER Channel on port: 64395
[AllTheKernelsApp] control ROUTER Channel on port: 64397
[AllTheKernelsApp] iopub PUB Channel on port: 64394
[AllTheKernelsApp] Heartbeat REP Channel on port: 64396
[AllTheKernelsApp] Writing connection file: C:\Users\Andy\AppData\Roaming\jupyter\runtime\kernel-41747d7a-f013-462e-90c7-c60924d0736f.json
[AllTheKernelsApp] To connect another client to this kernel, use:
[AllTheKernelsApp] --existing kernel-41747d7a-f013-462e-90c7-c60924d0736f.json
Traceback (most recent call last):
File "c:\users\andy\scoop\apps\python\current\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\andy\scoop\apps\python\current\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "c:\users\andy\scoop\apps\python\current\lib\site-packages\allthekernels.py", line 206, in <module>
main()
File "c:\users\andy\scoop\apps\python\current\lib\site-packages\traitlets\config\application.py", line 846, in launch_instance
app.start()
File "c:\users\andy\scoop\apps\python\current\lib\site-packages\ipykernel\kernelapp.py", line 665, in start
self.kernel.start()
File "c:\users\andy\scoop\apps\python\current\lib\site-packages\allthekernels.py", line 96, in start
super().start()
File "c:\users\andy\scoop\apps\python\current\lib\site-packages\ipykernel\kernelbase.py", line 507, in start
self._publish_status('starting', 'shell')
TypeError: _publish_status() takes 2 positional arguments but 3 were given
[AllTheKernelsApp] Cleaning up sockets
[AllTheKernelsApp] Closing heartbeat channel
[AllTheKernelsApp] Closing iopub channel
[AllTheKernelsApp] Closing control thread
[AllTheKernelsApp] Closing shell channel
[AllTheKernelsApp] Closing control channel
[AllTheKernelsApp] Closing stdin channel
[AllTheKernelsApp] Terminating zmq context
[AllTheKernelsApp] Terminated zmq context
It would be very useful to be able to change the default kernel. For example, by supporting
>>kernelname
to change to the specified kernel until otherwise specified.
>>sql
select * from t1
select * from t2
>python
print("Hello Jupyter");
select * from t3
>>python
print("Hello Europa");
print("Hello Io");
Hello, since it seems we cannot do PRs I would like to propose some installation instructions (I could not find them anywhere) to add in the README.md in this issue:
# Installation
1. Download and extract the contents of this repository or clone it (<code>git clone https://github.com/minrk/allthekernels.git</code>).
2. Navigate to the cloned/extracted repository folder.
3. Install with <code>pip install .</code> (or <code>pip3</code> instead of <code>pip</code> in Linux)
My idea would be:
>!ir
...
Will set the default kernel for that session to ir
and execute the rest of the cell in the ir
kernel.
I can sent a PR.
Ahead of a demo at euroscipy, I realized the allthekernels appears to not work with JupyterLab unfortunately.
Dear all,
How do I install this kernel on a jupyterhub? I use notebooks with the maxima-jupyter kernel and need the ability to execute cells with a python kernel within these notebooks.
Any help would be appreciated.
Kind regards,
Simon
Thanks for this great "meta"-kernel!
One thing though, when executing two consecutive cells which use a different kernel, the second cell won't wait for the first one to finish, if the kernel of the second cell is not busy. In other words, the execution state is per kernel.
While that may be useful in some situations, would it be possible to optionally block the execution until all kernels are idle?
Hi,
Allthekernel is very useful, but we have an issue with the shutdown/restart behavior:
For example, I open a new allthekernel notebook, and in new cells, try two commands on two different "subkernels":
The process state is the following:
# ps -efj f
UID PID PPID PGID SID C STIME TTY STAT TIME CMD
someuser 34 1 34 34 0 20:53 ? Ssl 0:01 /opt/conda/bin/python /opt/conda/bin/jupyterhub-singleuser --port=57065 --notebook-dir=/home/...
someuser 234 34 234 234 0 20:56 ? Ssl 0:00 \_ /opt/conda/bin/python -m allthekernels -f /home/someuser/.local/share/jupyter/runtime/kernel-7937de75-2d15-4c2a-b014-32e7043f85cc.json
someuser 252 234 252 252 1 20:56 ? Ssl 0:00 \_ /opt/conda/bin/python -m ipykernel_launcher -f /home/someuser/.local/share/jupyter/runtime/kernel-7937de75-2d15-4c2a-b014-32e7043f85cc-python3.json
someuser 267 234 267 267 99 20:57 ? Ssl 0:13 \_ java -jar /usr/local/share/jupyter/kernels/scala/launcher.jar --jupyter-path /usr/local/share/jupyter/kernels ...
Note: Both childs have the same parent, but does not belong to the same process group.
After shutting down allthekernel, the two subkernels processes didn't received the SIGHUP (or KernelManager "do_shutdown()" routine) properly:
someuser 252 1 252 252 0 20:56 ? Zs 0:00 [python] <defunct>
someuser 267 1 267 267 26 20:57 ? Ssl 0:13 java -jar /usr/local/share/jupyter/kernels/scala/launcher.jar --jupyter-path /usr/local/share/jupyter/kernels ...
Both childs became orphan (going under pid 1 under docker), the python one went zombie, but the java one seems to handle it well and stays alive.
Process not dying along with the kernel eventually lead to memory issues.
Shutting down allthekernel should shut down the whole process tree under it (or try to do it somehow by triggering subkernels do_shutdown() and delegate them that task.
something like:
def do_shutdown(self, restart):
for kernel in self.kernels.values():
kernel.do_shutdown(restart)
super().do_shutdown(restart)
Do you think it's feasible? Right now the scala kernel (almond) stays up forever.
Cheers,
Dear all
I am using allthekernels on a jupyterhub.
If I send an input() to a python kernel:
python3
a=input(0
Jupyter does not return anything.
Any ideas would be appreciated.
C:\data\external\jupyter\allthekernels (master)
[ipython-notebook] λ python setup.py install
Traceback (most recent call last):
File "setup.py", line 56, in <module>
setup(**setup_args)
File "C:\portabel\miniconda\envs\ipython-notebook\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "C:\portabel\miniconda\envs\ipython-notebook\lib\distutils\dist.py", line 252, in __init__
getattr(self.metadata, "set_" + key)(val)
File "C:\portabel\miniconda\envs\ipython-notebook\lib\distutils\dist.py", line 1209, in set_requires
distutils.versionpredicate.VersionPredicate(v)
File "C:\portabel\miniconda\envs\ipython-notebook\lib\distutils\versionpredicate.py", line 114, in __init__
raise ValueError("expected parenthesized list: %r" % paren)
ValueError: expected parenthesized list: '>=4.3'
According to http://www.gossamer-threads.com/lists/python/bugs/1048524#1048524 and https://stackoverflow.com/questions/16127080/setup-py-expected-parenthesized-list-when-required-package-name-contains-a-dash it doesn't work with distutil and pypi names and ou should use setuptools?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.