jupyterlab-sos
jupyterlab-sos copied to clipboard
JupyterLab SoS kernel missing right panel kernel selections
@BoPeng when you install latest components of SoS suite with Python 3.12 and JupyterLab 4.0, do you have issues with JupyterLab? This is what i experience:
However my JupyterLab command output looks normal,
To access the server, open this file in a browser:
file:///home/gw/.local/share/jupyter/runtime/jpserver-1129777-open.html
Or copy and paste one of these URLs:
http://localhost:8890/lab?token=942df340c7ebdec4d45c4241c705aad5b7ced19a9e703849
http://127.0.0.1:8890/lab?token=942df340c7ebdec4d45c4241c705aad5b7ced19a9e703849
[I 2024-04-11 20:12:46.743 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, julia-language-server, pyright, python-language-server, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[W 2024-04-11 20:12:48.409 LabApp] Could not determine jupyterlab build status without nodejs
[I 2024-04-11 20:12:49.935 ServerApp] Kernel started: 1654bafd-95b6-4a3a-aefe-b646cd9a5d4f
/home/gw/micromamba/envs/python_libs/lib/python3.12/site-packages/sos_notebook/kernel.py:20: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[I 2024-04-11 20:12:51.309 ServerApp] Connecting to kernel 1654bafd-95b6-4a3a-aefe-b646cd9a5d4f.
[I 2024-04-11 20:12:51.325 ServerApp] Connecting to kernel 1654bafd-95b6-4a3a-aefe-b646cd9a5d4f.
[I 2024-04-11 20:12:51.346 ServerApp] Connecting to kernel 1654bafd-95b6-4a3a-aefe-b646cd9a5d4f.
[I 2024-04-11 20:13:06.202 ServerApp] Creating new notebook in /code/mnm_analysis
[I 2024-04-11 20:13:06.599 ServerApp] Kernel started: 2989ac07-7386-4abf-ad6f-77a637ecbf7a
/home/gw/micromamba/envs/python_libs/lib/python3.12/site-packages/sos_notebook/kernel.py:20: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[I 2024-04-11 20:13:07.920 ServerApp] Connecting to kernel 2989ac07-7386-4abf-ad6f-77a637ecbf7a.
[I 2024-04-11 20:14:53.367 ServerApp] Saving file at /code/mnm_analysis/Untitled.ipynb
[I 2024-04-11 20:16:53.437 ServerApp] Saving file at /code/mnm_analysis/Untitled.ipynb
[I 2024-04-11 20:18:53.523 ServerApp] Saving file at /code/mnm_analysis/Untitled.ipynb
Since for long time I've been running SoS notebook related components under JupyterLab 3.6 + Python 3.9, my recent upgrade seem to have various issues. I wonder if these issues can be reproduced on your end or it's just because I'm using some conda packages that are outdated even though my sos-notebook and jupyterlab-sos are the most up-to-date.
Looks like it's still an issue with my installation which uses older conda packages. For exmaple, SoS notebook cannot be upgrade on conda-forge because ipykernel no longer ships a tests folder. So import ipykernel.tests throws an error.
Will use more specific tickets to follow up then revisit this when all is fixed.
Reopen this because even after i upgraded to latest jupyter-sos and sos-notebook it still does not work. No error from CLI terminal but there are no cell kernel choices and no syntax highlight.
Here are my versions relevant to SoS.
jupyterlab_sos 0.10.1 py_0 dnachun
sos 0.25.1 pyhd8ed1ab_0 conda-forge
sos-bash 0.20.0 py_0 conda-forge
sos-notebook 0.24.4 py_0 dnachun
sos-python 0.18.4 py_0 conda-forge
sos-r 0.20.1 pyhd8ed1ab_0 conda-forge
python 3.12.2 hab00c5b_0_cpython conda-forge
On my end,
- Python 3.12.0
- Jupyterlab 4.1.6
- jupyterlab-sos 0.10.1
- sos 0.25.1
- sos-notebook 0.24.4
- sos-pbs 0.20.8
You need to check
jupyter kernelspec list --json
and see if the sos kernel is installed. Otherwise you need to run
python -m sos_notebook.install
Somehow I am seeing jupyterlab-sos 0.9.1
(py12) ➜ ~ jupyter labextension list
JupyterLab v4.1.6
/Users/bpeng/anaconda3/envs/py12/share/jupyter/labextensions
jupyterlab-sos v0.9.0 enabled OK (python, jupyterlab_sos)
transient-display-data v0.4.4 enabled OK (python, transient-display-data)
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
@jupyter-notebook/lab-extension v7.1.2 enabled OK
@jupyter-widgets/jupyterlab-manager v5.0.10 enabled OK (python, jupyterlab_widgets)
When you start a sos notebook, do you see any error message from console window (chrome, shift-right click, inspect, console)
Thanks @BoPeng for the detailed guide! To clarify, all packages i installed are from conda, including these packages temporarily, until we send in a PR:
https://anaconda.org/dnachun/sos-notebook https://anaconda.org/dnachun/jupyterlab-sos
I don't see in my labextension jupyterlab-sos ,
$ jupyter labextension list
JupyterLab v4.1.6
/home/gw/micromamba/envs/python_libs/share/jupyter/labextensions
nbdime-jupyterlab v3.0.1 enabled OK
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
transient-display-data v0.4.4 enabled OK (python, transient-display-data)
jupyter-matplotlib v0.11.3 enabled OK
ipyparallel-labextension v8.8.0 enabled OK
@jupyter-widgets/jupyterlab-manager v5.0.10 enabled OK (python, jupyterlab_widgets)
@jupyter-lsp/jupyterlab-lsp v5.1.0 enabled OK (python, jupyterlab-lsp)
Disabled extensions:
@jupyterlab/completer-extension:base-service
@jupyterlab/fileeditor-extension:language-server
@jupyterlab/lsp-extension:settings
@jupyterlab/notebook-extension:language-server
even though they seem to be installed,
$ ls /home/gw/micromamba/envs/python_libs/share/jupyter/labextensions
ipyparallel-labextension jupyterlab-sos jupyter-matplotlib nbdime-jupyterlab
jupyterlab_pygments @jupyter-lsp @jupyter-widgets transient-display-data
But in your list it was not the correct version either right?
My kernels appear fine,
$ jupyter kernelspec list
Available kernels:
bash /home/gw/micromamba/envs/python_libs/share/jupyter/kernels/bash
calysto_bash /home/gw/micromamba/envs/python_libs/share/jupyter/kernels/calysto_bash
ir /home/gw/micromamba/envs/python_libs/share/jupyter/kernels/ir
markdown /home/gw/micromamba/envs/python_libs/share/jupyter/kernels/markdown
python3 /home/gw/micromamba/envs/python_libs/share/jupyter/kernels/python3
sos /home/gw/micromamba/envs/python_libs/share/jupyter/kernels/sos
My console window looks like this
Finally, to double check,
$ micromamba list | grep -P "sos|lab"
jupyterlab 4.1.6 pyhd8ed1ab_0 conda-forge
jupyterlab-lsp 5.1.0 pyhd8ed1ab_2 conda-forge
jupyterlab-sos 0.10.1 0 dnachun
jupyterlab-transient-display-data 0.4.4 py_0 dnachun
jupyterlab_pygments 0.3.0 pyhd8ed1ab_1 conda-forge
jupyterlab_server 2.26.0 pyhd8ed1ab_0 conda-forge
jupyterlab_sos 0.10.1 py_0 dnachun
jupyterlab_widgets 3.0.10 pyhd8ed1ab_0 conda-forge
sos 0.25.1 pyhd8ed1ab_0 conda-forge
sos-bash 0.20.0 py_0 conda-forge
sos-notebook 0.24.4 py_0 dnachun
sos-python 0.18.4 py_0 conda-forge
sos-r 0.20.1 pyhd8ed1ab_0 conda-forge
In my labextension folder
$ ls /home/gw/micromamba/envs/python_libs/share/jupyter/labextensions/jupyterlab-sos/
install.json
and
$ cat /home/gw/micromamba/envs/python_libs/share/jupyter/labextensions/transient-display-data/install.json
{
"packageManager": "python",
"packageName": "transient-display-data",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package transient-display-data"
}
It does not seem to have aactual contents. So maybe the installation did not work in the first place.
However, after running
$ pip install jupyterlab-sos --force-reinstall --no-deps
Collecting jupyterlab-sos
Using cached jupyterlab_sos-0.10.1-py3-none-any.whl.metadata (5.4 kB)
Using cached jupyterlab_sos-0.10.1-py3-none-any.whl (219 kB)
Installing collected packages: jupyterlab-sos
Attempting uninstall: jupyterlab-sos
Found existing installation: jupyterlab_sos 0.10.1
Uninstalling jupyterlab_sos-0.10.1:
Successfully uninstalled jupyterlab_sos-0.10.1
Successfully installed jupyterlab-sos-0.10.1
then, i get also jupyterlab-sos v0.9.0 enabled OK (python, jupyterlab_sos)
$ ls /home/gw/micromamba/envs/python_libs/share/jupyter/labextensions/jupyterlab-sos/
build_log.json install.json package.json schemas static
JupyterLab v4.1.6
/home/gw/micromamba/envs/python_libs/share/jupyter/labextensions
nbdime-jupyterlab v3.0.1 enabled OK
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
transient-display-data v0.4.4 enabled OK (python, transient-display-data)
jupyter-matplotlib v0.11.3 enabled OK
ipyparallel-labextension v8.8.0 enabled OK
jupyterlab-sos v0.9.0 enabled OK (python, jupyterlab_sos)
@jupyter-widgets/jupyterlab-manager v5.0.10 enabled OK (python, jupyterlab_widgets)
@jupyter-lsp/jupyterlab-lsp v5.1.0 enabled OK (python, jupyterlab-lsp)
Disabled extensions:
@jupyterlab/completer-extension:base-service
@jupyterlab/fileeditor-extension:language-server
@jupyterlab/lsp-extension:settings
@jupyterlab/notebook-extension:language-server
Unfortunately even after this, it does not work -- no syntax highlight or cell level kernel menu, although console look cleaner, with a different type of error though
Update: if i force reinstall everything via pip including dependencies,
$ pip install jupyterlab-sos --force-reinstall
...
Successfully installed MarkupSafe-2.1.5 anyio-4.3.0 argon2-cffi-23.1.0 argon2-cffi-bindings-21.2.0 arrow-1.3.0 asttokens-2.4.1 async-lru-2.0.4 attrs-23.2.0 babel-2.14.0 beautifulsoup4-4.12.3 bleach-6.1.0 certifi-2024.2.2 cffi-1.16.0 charset-normalizer-3.3.2 comm-0.2.2 debugpy-1.8.1 decorator-5.1.1 defusedxml-0.7.1 executing-2.0.1 fasteners-0.19 fastjsonschema-2.19.1 fqdn-1.5.1 h11-0.14.0 httpcore-1.0.5 httpx-0.27.0 idna-3.7 ipykernel-6.29.4 ipython-8.23.0 isoduration-20.11.0 jedi-0.19.1 jinja2-3.1.3 json5-0.9.24 jsonpointer-2.4 jsonschema-4.21.1 jsonschema-specifications-2023.12.1 jupyter-client-8.6.1 jupyter-core-5.7.2 jupyter-events-0.10.0 jupyter-lsp-2.2.5 jupyter-server-2.14.0 jupyter-server-terminals-0.5.3 jupyterlab-4.1.6 jupyterlab-pygments-0.3.0 jupyterlab-server-2.26.0 jupyterlab-sos-0.10.1 matplotlib-inline-0.1.6 mistune-3.0.2 nbclient-0.10.0 nbconvert-7.16.3 nbformat-5.10.4 nest-asyncio-1.6.0 networkx-3.3 notebook-7.1.2 notebook-shim-0.2.4 numpy-1.26.4 overrides-7.7.0 packaging-24.0 pandas-2.2.2 pandocfilters-1.5.1 parso-0.8.4 pexpect-4.9.0 platformdirs-4.2.0 prometheus-client-0.20.0 prompt-toolkit-3.0.43 psutil-5.9.8 ptyprocess-0.7.0 pure-eval-0.2.2 pycparser-2.22 pydot-2.0.0 pydotplus-2.0.2 pygments-2.17.2 pyparsing-3.1.2 python-dateutil-2.9.0.post0 python-json-logger-2.0.7 pytz-2024.1 pyyaml-6.0.1 pyzmq-25.1.2 referencing-0.34.0 requests-2.31.0 rfc3339-validator-0.1.4 rfc3986-validator-0.1.1 rpds-py-0.18.0 send2trash-1.8.3 six-1.16.0 sniffio-1.3.1 sos-0.25.1 sos-notebook-0.24.4 soupsieve-2.5 stack-data-0.6.3 tabulate-0.9.0 terminado-0.18.1 tinycss2-1.2.1 tornado-6.4 tqdm-4.66.2 traitlets-5.14.2 transient-display-data-0.4.4 types-python-dateutil-2.9.0.20240316 tzdata-2024.1 uri-template-1.3.0 urllib3-2.2.1 wcwidth-0.2.13 webcolors-1.13 webencodings-0.5.1 websocket-client-1.7.0 xxhash-3.4.1
Then everything indeed seems to work,
although i still have the type error
So, it seems that @BoPeng at least this type error, and the jupyterlab-sos 0.9.0 confusions are the only issues using pip install.
On our end, @danielnachun it seems the conda packages (via pixi + micromamba) still did not work properly,even though pip works. I wonder why that is the case ... perhaps let's first PR what we have and see them together? The current conda packages on conda-forge are broken anyways so we are not making things any worse ...
Let me try again using conda.
Even for the pip version, i noticed that the previous highlight of _input _output etc is now gone,
If it is not intential then it might have to do with some of the errors we saw in the console?
Even for the pip version, i noticed that the previous highlight of _input _output etc is now gone,
This is a known issue. JLab switched to CodeMirror6, which required a complete rewrite of the syntax highlighting stuff..
https://github.com/vatlab/jupyterlab-sos/issues/65#issuecomment-1720700731
@BoPeng We have fixed all of the issues here with the Conda package with some small tweaks to the feedstock recipe:
- We need to manually copy the
labextensionfiles into the right folder. This is just an extra line in the recipe. In our particular setup we also have to add a line to ourjupyter_lab_config.py, but this is specific to our setup and not something that needs any changes tojupyterlab-sosor the Conda package. - There were some missing dependencies for building with
hatchling. - One of the subpackages was missing
noarch: python, so it was needlessly building platform specific packages.
I will push a PR with all these fixes to https://github.com/conda-forge/jupyterlab-sos-feedstock.
@BoPeng as this issue is not closed yet and the problem is the same let me post here.
I've installed jupyter and SoS using the pixi+ micromamba install set up with @gaow and @danielnachun.
Everything seems to install correctly with no error or warning messages.
Problem: I Cannot see the cell level kernels in the drop down menu when using SoS.
OS: I'm trying to run this in our cluster which is Debian Linux
This is how my install looks like
dmc2245@csglogin:~$ jupyter labextension list
JupyterLab v4.2.0
/home/dmc2245/micromamba/envs/python_libs/share/jupyter/labextensions
ipyparallel-labextension v8.8.0 enabled OK
jupyter-matplotlib v0.11.4 enabled OK
jupyterlab-sos v0.9.0 enabled OK (python, jupyterlab_sos)
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
nbdime-jupyterlab v3.0.1 enabled OK
transient-display-data v0.4.4 enabled OK (python, transient-display-data)
@jupyter-lsp/jupyterlab-lsp v5.1.0 enabled OK (python, jupyterlab-lsp)
@jupyter-widgets/jupyterlab-manager v5.0.10 enabled OK (python, jupyterlab_widgets)
Disabled extensions:
@jupyterlab/completer-extension:base-service
@jupyterlab/fileeditor-extension:language-server
@jupyterlab/lsp-extension:settings
@jupyterlab/notebook-extension:language-server
dmc2245@csglogin:~$ ls /home/dmc2245/micromamba/envs/python_libs/share/jupyter/labextensions/jupyterlab-sos/
build_log.json install.json package.json schemas static
dmc2245@csglogin:~$ ls ~/micromamba/envs/python_libs/share/jupyter/labextensions
ipyparallel-labextension jupyterlab_pygments jupyterlab-sos @jupyter-lsp jupyter-matplotlib @jupyter-widgets nbdime-jupyterlab transient-display-data
dmc2245@csglogin:~$ jupyter kernelspec list
Available kernels:
bash /mnt/vast/hpc/homes/dmc2245/.local/share/jupyter/kernels/bash
calysto_bash /mnt/vast/hpc/homes/dmc2245/.local/share/jupyter/kernels/calysto_bash
ir /mnt/vast/hpc/homes/dmc2245/.local/share/jupyter/kernels/ir
markdown /mnt/vast/hpc/homes/dmc2245/.local/share/jupyter/kernels/markdown
python3 /mnt/vast/hpc/homes/dmc2245/.local/share/jupyter/kernels/python3
sos /mnt/vast/hpc/homes/dmc2245/.local/share/jupyter/kernels/sos
dmc2245@csglogin:~$ cat ~/micromamba/envs/python_libs/share/jupyter/labextensions/transient-display-data/install.json
{
"packageManager": "python",
"packageName": "transient-display-data",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package transient-display-data"
}
Then I tried to apply the same @gaow did to re-install jupyterlab-sos. But it complained with the error message below
dmc2245@csglogin:~$ pip install jupyterlab-sos --force-reinstall
Installing collected packages: webencodings, wcwidth, pytz, pure-eval, ptyprocess, fastjsonschema, xxhash, websocket-client, webcolors, urllib3, uri-template, tzdata, types-python-dateutil, transient-display-data, traitlets, tqdm, tornado, tinycss2, tabulate, soupsieve, sniffio, six, send2trash, rpds-py, rfc3986-validator, pyzmq, pyyaml, python-json-logger, pyparsing, pygments, pycparser, psutil, prompt-toolkit, prometheus-client, platformdirs, pexpect, parso, pandocfilters, packaging, overrides, numpy, networkx, nest-asyncio, mistune, MarkupSafe, jupyterlab-pygments, jsonpointer, json5, idna, h11, fqdn, fasteners, executing, defusedxml, decorator, debugpy, charset-normalizer, certifi, babel, attrs, async-lru, terminado, rfc3339-validator, requests, referencing, python-dateutil, pydotplus, pydot, matplotlib-inline, jupyter-core, jinja2, jedi, httpcore, comm, cffi, bleach, beautifulsoup4, asttokens, anyio, stack-data, pandas, jupyter-server-terminals, jupyter-client, jsonschema-specifications, httpx, arrow, argon2-cffi-bindings, jsonschema, isoduration, ipython, argon2-cffi, nbformat, ipykernel, sos, nbclient, jupyter-events, nbconvert, jupyter-server, notebook-shim, jupyterlab-server, jupyter-lsp, jupyterlab, notebook, sos-notebook, jupyterlab-sos
Successfully installed MarkupSafe-2.1.5 anyio-4.3.0 argon2-cffi-23.1.0 argon2-cffi-bindings-21.2.0 arrow-1.3.0 asttokens-2.4.1 async-lru-2.0.4 attrs-23.2.0 babel-2.15.0 beautifulsoup4-4.12.3 bleach-6.1.0 certifi-2024.2.2 cffi-1.16.0 charset-normalizer-3.3.2 comm-0.2.2 debugpy-1.8.1 decorator-5.1.1 defusedxml-0.7.1 executing-2.0.1 fasteners-0.19 fastjsonschema-2.19.1 fqdn-1.5.1 h11-0.14.0 httpcore-1.0.5 httpx-0.27.0 idna-3.7 ipykernel-6.29.4 ipython-8.24.0 isoduration-20.11.0 jedi-0.19.1 jinja2-3.1.4 json5-0.9.25 jsonpointer-2.4 jsonschema-4.22.0 jsonschema-specifications-2023.12.1 jupyter-client-8.6.2 jupyter-core-5.7.2 jupyter-events-0.10.0 jupyter-lsp-2.2.5 jupyter-server-2.14.0 jupyter-server-terminals-0.5.3 jupyterlab-4.2.1 jupyterlab-pygments-0.3.0 jupyterlab-server-2.27.2 jupyterlab-sos-0.10.1 matplotlib-inline-0.1.7 mistune-3.0.2 nbclient-0.10.0 nbconvert-7.16.4 nbformat-5.10.4 nest-asyncio-1.6.0 networkx-3.3 notebook-7.2.0 notebook-shim-0.2.4 numpy-1.26.4 overrides-7.7.0 packaging-24.0 pandas-2.2.2 pandocfilters-1.5.1 parso-0.8.4 pexpect-4.9.0 platformdirs-4.2.2 prometheus-client-0.20.0 prompt-toolkit-3.0.43 psutil-5.9.8 ptyprocess-0.7.0 pure-eval-0.2.2 pycparser-2.22 pydot-2.0.0 pydotplus-2.0.2 pygments-2.18.0 pyparsing-3.1.2 python-dateutil-2.9.0.post0 python-json-logger-2.0.7 pytz-2024.1 pyyaml-6.0.1 pyzmq-26.0.3 referencing-0.35.1 requests-2.32.2 rfc3339-validator-0.1.4 rfc3986-validator-0.1.1 rpds-py-0.18.1 send2trash-1.8.3 six-1.16.0 sniffio-1.3.1 sos-0.25.1 sos-notebook-0.24.4 soupsieve-2.5 stack-data-0.6.3 tabulate-0.9.0 terminado-0.18.1 tinycss2-1.3.0 tornado-6.4 tqdm-4.66.4 traitlets-5.14.3 transient-display-data-0.4.4 types-python-dateutil-2.9.0.20240316 tzdata-2024.1 uri-template-1.3.0 urllib3-2.2.1 wcwidth-0.2.13 webcolors-1.13 webencodings-0.5.1 websocket-client-1.8.0 xxhash-3.4.1
Even after installing all jupyter-notebook again and with dependencies I still don't see the SoS kernels
I do see this message at the bottom of the notebook
Initialized - Additional servers needed
SoS
This is the logfile for the jupyter-notebook
[I 2024-05-23 10:45:55.730 ServerApp] ipyparallel | extension was successfully linked.
[I 2024-05-23 10:45:55.730 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-05-23 10:45:55.733 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-05-23 10:45:55.737 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-05-23 10:45:55.747 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-05-23 10:45:55.965 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-05-23 10:45:55.969 ServerApp] Loading IPython parallel extension
[I 2024-05-23 10:45:55.969 ServerApp] ipyparallel | extension was successfully loaded.
[I 2024-05-23 10:45:55.972 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-05-23 10:45:55.974 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-05-23 10:45:55.998 LabApp] JupyterLab extension loaded from /home/dmc2245/micromamba/envs/python_libs/lib/python3.12/site-packages/jupyterlab
[I 2024-05-23 10:45:55.998 LabApp] JupyterLab application directory is /mnt/vast/hpc/homes/dmc2245/.pixi/envs/jupyterlab/share/jupyter/lab
[I 2024-05-23 10:45:55.999 LabApp] Extension Manager is 'pypi'.
[I 2024-05-23 10:45:56.026 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-05-23 10:45:56.026 ServerApp] Serving notebooks from local directory: /mnt/vast/hpc/homes/dmc2245
[I 2024-05-23 10:45:56.026 ServerApp] Jupyter Server 2.14.0 is running at:
[I 2024-05-23 10:45:56.026 ServerApp] http://node72:8259/lab?token=8701b53f43c677cda8b6e6451cae962b467922b5c7373bb1
[I 2024-05-23 10:45:56.026 ServerApp] http://127.0.0.1:8259/lab?token=8701b53f43c677cda8b6e6451cae962b467922b5c7373bb1
[I 2024-05-23 10:45:56.026 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2024-05-23 10:45:56.044 ServerApp]
To access the server, open this file in a browser:
file:///mnt/vast/hpc/homes/dmc2245/.local/share/jupyter/runtime/jpserver-28380-open.html
Or copy and paste one of these URLs:
http://node72:8259/lab?token=8701b53f43c677cda8b6e6451cae962b467922b5c7373bb1
http://127.0.0.1:8259/lab?token=8701b53f43c677cda8b6e6451cae962b467922b5c7373bb1
[I 2024-05-23 10:45:57.850 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, julia-language-server, pyright, python-language-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[W 2024-05-23 10:53:54.254 LabApp] Could not determine jupyterlab build status without nodejs
[W 2024-05-23 10:53:55.141 ServerApp] 404 POST /nbdime/api/isgit?1716476035016 ([email protected]) 24.85ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.481 ServerApp] 404 POST /nbdime/api/isgit?1716476035059 ([email protected]) 364.18ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.483 ServerApp] 404 POST /nbdime/api/isgit?1716476035073 ([email protected]) 1.59ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.485 ServerApp] 404 POST /nbdime/api/isgit?1716476035072 ([email protected]) 1.92ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.494 ServerApp] 404 POST /nbdime/api/isgit?1716476035104 ([email protected]) 1.42ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.496 ServerApp] 404 POST /nbdime/api/isgit?1716476035089 ([email protected]) 2.92ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.498 ServerApp] 404 POST /nbdime/api/isgit?1716476035103 ([email protected]) 1.43ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.500 ServerApp] 404 POST /nbdime/api/isgit?1716476035104 ([email protected]) 1.32ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.502 ServerApp] 404 POST /nbdime/api/isgit?1716476035119 ([email protected]) 1.94ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.504 ServerApp] 404 POST /nbdime/api/isgit?1716476035138 ([email protected]) 2.80ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.506 ServerApp] 404 POST /nbdime/api/isgit?1716476035138 ([email protected]) 1.33ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.506 ServerApp] 404 POST /nbdime/api/isgit?1716476035138 ([email protected]) 1.86ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 10:53:55.509 ServerApp] 404 POST /nbdime/api/isgit?1716476035138 ([email protected]) 1.07ms referer=http://127.0.0.1:8259/lab
[I 2024-05-23 10:53:56.260 ServerApp] Kernel started: 9c4051a1-4e9c-42da-807b-c9bade51b625
[I 2024-05-23 10:53:56.261 ServerApp] Kernel started: f0aed5a7-0014-4f1f-9f29-553195d4f19a
[I 2024-05-23 10:53:56.266 ServerApp] Kernel started: 485a706d-9797-4c24-9bd4-4844d188e584
[I 2024-05-23 10:53:56.268 ServerApp] Kernel started: 1ae1984e-d0e9-42f8-9512-356b99a17c45
/home/dmc2245/micromamba/envs/python_libs/lib/python3.12/site-packages/sos_notebook/kernel.py:20: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
/home/dmc2245/micromamba/envs/python_libs/lib/python3.12/site-packages/sos_notebook/kernel.py:20: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
[I 2024-05-23 10:54:01.614 ServerApp] Connecting to kernel 1ae1984e-d0e9-42f8-9512-356b99a17c45.
[I 2024-05-23 10:54:01.626 ServerApp] Connecting to kernel 9c4051a1-4e9c-42da-807b-c9bade51b625.
[I 2024-05-23 10:54:01.648 ServerApp] Connecting to kernel 485a706d-9797-4c24-9bd4-4844d188e584.
[I 2024-05-23 10:54:01.692 ServerApp] Starting buffering for 1ae1984e-d0e9-42f8-9512-356b99a17c45:60efca78-2acf-4ef4-9853-fa68e9bfdf4f
[I 2024-05-23 10:54:01.704 ServerApp] Connecting to kernel f0aed5a7-0014-4f1f-9f29-553195d4f19a.
[I 2024-05-23 10:54:01.720 ServerApp] Connecting to kernel 1ae1984e-d0e9-42f8-9512-356b99a17c45.
[I 2024-05-23 10:54:01.736 ServerApp] Connecting to kernel 1ae1984e-d0e9-42f8-9512-356b99a17c45.
[IPKernelApp] WARNING | No such comm: 9050332e-aa03-49c3-a794-1b242ec9e15b
[IPKernelApp] WARNING | No such comm: a5f5583c-0ebe-4d46-a11b-d6a75b349a84
[I 2024-05-23 10:55:55.844 ServerApp] Saving file at /Untitled2.ipynb
[I 2024-05-23 10:59:56.029 ServerApp] Saving file at /Untitled2.ipynb
[I 2024-05-23 11:30:09.837 LabApp] 302 GET /lab/tree/Untitled1.ipynb (@192.168.100.5) 0.35ms
[W 2024-05-23 11:30:32.637 LabApp] Could not determine jupyterlab build status without nodejs
[I 2024-05-23 11:30:32.697 ServerApp] Connecting to kernel 9c4051a1-4e9c-42da-807b-c9bade51b625.
[I 2024-05-23 11:30:32.715 ServerApp] Connecting to kernel f0aed5a7-0014-4f1f-9f29-553195d4f19a.
[I 2024-05-23 11:30:32.731 ServerApp] Connecting to kernel 485a706d-9797-4c24-9bd4-4844d188e584.
[I 2024-05-23 11:30:32.849 ServerApp] Connecting to kernel 1ae1984e-d0e9-42f8-9512-356b99a17c45.
[W 2024-05-23 11:30:33.291 ServerApp] 404 POST /nbdime/api/isgit?1716478233206 ([email protected]) 1.50ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.292 ServerApp] 404 POST /nbdime/api/isgit?1716478233242 ([email protected]) 1.09ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.292 ServerApp] 404 POST /nbdime/api/isgit?1716478233253 ([email protected]) 1.46ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.294 ServerApp] 404 POST /nbdime/api/isgit?1716478233254 ([email protected]) 1.32ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.296 ServerApp] 404 POST /nbdime/api/isgit?1716478233267 ([email protected]) 1.02ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.304 ServerApp] 404 POST /nbdime/api/isgit?1716478233277 ([email protected]) 1.27ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.305 ServerApp] 404 POST /nbdime/api/isgit?1716478233278 ([email protected]) 2.03ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.306 ServerApp] 404 POST /nbdime/api/isgit?1716478233278 ([email protected]) 2.84ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.316 ServerApp] 404 POST /nbdime/api/isgit?1716478233290 ([email protected]) 0.66ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.327 ServerApp] 404 POST /nbdime/api/isgit?1716478233300 ([email protected]) 0.79ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.328 ServerApp] 404 POST /nbdime/api/isgit?1716478233301 ([email protected]) 1.08ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.330 ServerApp] 404 POST /nbdime/api/isgit?1716478233301 ([email protected]) 0.90ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.331 ServerApp] 404 POST /nbdime/api/isgit?1716478233301 ([email protected]) 0.93ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.370 ServerApp] 404 POST /nbdime/api/isgit?1716478233344 ([email protected]) 0.89ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.372 ServerApp] 404 POST /nbdime/api/isgit?1716478233344 ([email protected]) 1.85ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.373 ServerApp] 404 POST /nbdime/api/isgit?1716478233344 ([email protected]) 1.10ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.375 ServerApp] 404 POST /nbdime/api/isgit?1716478233345 ([email protected]) 0.95ms referer=http://127.0.0.1:8259/lab
[W 2024-05-23 11:30:33.575 ServerApp] 404 POST /nbdime/api/isgit?1716478233545 ([email protected]) 1.76ms referer=http://127.0.0.1:8259/lab
[I 2024-05-23 11:30:34.239 ServerApp] Connecting to kernel 485a706d-9797-4c24-9bd4-4844d188e584.
[I 2024-05-23 11:30:34.258 ServerApp] Connecting to kernel f0aed5a7-0014-4f1f-9f29-553195d4f19a.
[I 2024-05-23 11:30:34.278 ServerApp] Connecting to kernel 9c4051a1-4e9c-42da-807b-c9bade51b625.
[I 2024-05-23 11:30:34.303 ServerApp] Connecting to kernel 1ae1984e-d0e9-42f8-9512-356b99a17c45.
[IPKernelApp] WARNING | No such comm: 4db121ec-7812-4c82-bc4e-36933e53f711
[IPKernelApp] WARNING | No such comm: 7a4342b7-541e-44fe-b038-60d0f0ac8fbd
The console messages looks like (there are many other messages there)
I'm not sure how to get the drop-down kernels is SoS so I would appreciate any help on this!
Thank you
During the past few days, both @dianacornejo and @danielnachun tried everything including installing via pip and conda on jjupyter-sos but still we don't get the cell level kernel menu. There may be something fundamentally wrong with jupyter-sos in terms of compatibility with other packages? It is particularly confusing since we were able to get it work flawlessly less than a month ago!
@danielnachun @dianacornejo could you post here your package environment with versions , so @BoPeng can verify on their end? But @BoPeng Im guessing if you start from scratch installing all the latest version of packages you may run into the issue.
For conda based installation from scratch, this is the document we follow from:
https://wanggroup.org/orientation/jupyter-setup#purge-previous-installations-of-micromamba-or-miniconda
Thanks in advance for your help!
You guys can at least have a look at the official sos-notebook docker image and compare, right?
are you refering to this file? https://github.com/vatlab/sos/blob/master/development/docker-notebook/Dockerfile and https://hub.docker.com/r/vatlab/sos-notebook/tags ? its from years ago. Not sure how relevant it is.
Yes, I am talking about the official sos-notebook docker image. I can tell it is using jupyterlab 3.6.1 though. I can modify the docker file and upgrade it to jupyterlab 4.0. Hold on.
Update: Package versions for our departmental jupyterhub server: (output of pip list | grep jupyter and sos.
jupyter 1.0.0
jupyter_client 8.3.0
jupyter-console 6.6.3
jupyter-contrib-core 0.4.2
jupyter-contrib-nbextensions 0.7.0
jupyter_core 5.3.1
jupyter-events 0.6.3
jupyter-highlight-selected-word 0.2.0
jupyter-latex-envs 1.4.6
jupyter-lsp 2.2.0
jupyter-nbextensions-configurator 0.6.3
jupyter_packaging 0.12.3
jupyter_server 2.7.0
jupyter_server_fileid 0.9.0
jupyter-server-mathjax 0.2.6
jupyter_server_proxy 4.0.0
jupyter_server_terminals 0.5.1
jupyter_server_ydoc 0.8.0
jupyter-telemetry 0.1.0
jupyter-ydoc 0.2.5
jupyterhub 4.0.1
jupyterlab 4.0.10
jupyterlab-git 0.41.0
jupyterlab_pygments 0.3.0
jupyterlab_server 2.24.0
jupyterlab_sos 0.10.1
jupyterlab-widgets 3.0.8
jupyterlab_sos 0.10.1
sos 0.24.4
sos-bash 0.20.0
sos-javascript 0.20.0
sos-matlab 0.20.0
sos-notebook 0.24.4
sos-papermill 0.2.1
sos-pbs 0.20.8
sos-python 0.20.2
sos-r 0.20.1
sos-sas 0.20.0
Here is what does not work,
╰─ micromamba -n python_libs list | grep -P "sos|lab"
warning libmamba 'root_prefix' set with default value: /Users/gw2411/micromamba
jupyterlab 4.2.1 pyhd8ed1ab_0 conda-forge
jupyterlab-lsp 5.1.0 pyhd8ed1ab_2 conda-forge
jupyterlab-sos 0.10.1 hd8ed1ab_0 conda-forge
jupyterlab-transient-display-data 0.4.4 pyh5bfe37b_0 conda-forge
jupyterlab_pygments 0.3.0 pyhd8ed1ab_1 conda-forge
jupyterlab_server 2.27.2 pyhd8ed1ab_0 conda-forge
jupyterlab_sos 0.10.1 pyh80e38bb_0 conda-forge
jupyterlab_widgets 3.0.11 pyhd8ed1ab_0 conda-forge
sos 0.25.1 pyhd8ed1ab_0 conda-forge
sos-bash 0.18.1 py_0 conda-forge
sos-notebook 0.24.4 py_0 dnachun
sos-python 0.20.2 pyhd8ed1ab_0 conda-forge
sos-r 0.20.1 pyhd8ed1ab_0 conda-forge
Comparing this to what worked on April 12,
jupyterlab 4.1.6 pyhd8ed1ab_0 conda-forge
jupyterlab-lsp 5.1.0 pyhd8ed1ab_2 conda-forge
jupyterlab-sos 0.10.1 0 dnachun
jupyterlab-transient-display-data 0.4.4 py_0 dnachun
jupyterlab_pygments 0.3.0 pyhd8ed1ab_1 conda-forge
jupyterlab_server 2.26.0 pyhd8ed1ab_0 conda-forge
jupyterlab_sos 0.10.1 py_0 dnachun
jupyterlab_widgets 3.0.10 pyhd8ed1ab_0 conda-forge
sos 0.25.1 pyhd8ed1ab_0 conda-forge
sos-bash 0.20.0 py_0 conda-forge
sos-notebook 0.24.4 py_0 dnachun
sos-python 0.18.4 py_0 conda-forge
sos-r 0.20.1 pyhd8ed1ab_0 conda-forge
Looks like the issue is between JupyterLab version 4.1.x vs 4.2.x?
Yes, I updated our jupyterlab to 4.2.1 and jupyterlab-sos stops working. This is not supposed to happen (no api change for minor releases) but I will have a look later.
Update: just reverted to jupyterlab 4.1.6 and everything works.
Thanks, glad we identified the cause of the issue now. We can either freeze our version for now until later we have a fix, or just hold on for the fix hoping it is not a huge issue!
I have an abstract due today, but can have a look this evening. Hopefully this is just a minor issue.
I think the full changelog for Jupyter 4.2 should be here: https://github.com/jupyterlab/jupyterlab/compare/v4.2.0rc0...8a17ca61cf0943225ddc4506763228dd21c90dab. There's definitely no major changes so it's kind of hard to say what really broke...
I had the same problem and, following the advice here, found that using Jupyter 4.1.6 fixed the problem for new notebooks in JupyterLab.
Unfortunately, when I load an existing notebook, the dropdown doesn't appear. But, luckily, toggling simple mode makes it reappear. So there is a workaround.
However, if I switch to a non-SoS kernel, the menu doesn't go away. Furthermore, toggling simple mode also doesn't make the menu disappear: it just stays in place. Also, if I load a notebook with a non-SoS kernel and switch to SoS, toggling simple mode doesn't help; I have to save, exit, reload, then toggle.
Whether with a new notebook or a pre-loaded one, if I switch from Jupyter Lab to Notebook and back, the drop-down menu is gone (whether or not it's a SoS kernel)--which kind of makes sense, since the switch is basically like loading a pre-existing file. (Notebook never shows the menu for me--and it's 7.1.3, not 7.2.1.)
So something is a bit weird about how the menu customization is applied, even in JupyterLab 4.1.6. It might be that 4.2 didn't actually introduce a bug, just changed things enough to reveal one that otherwise wouldn't always happen.
I wonder if there could be a race condition involved? My computer is pretty fast (i9-14900HX etc) so parallel computations might come out in a different order for me than for others. Without looking at any code, it feels very much like the interface is mutable data that the SoS kernel adds to but isn't refreshed when switching kernels, but when loading a whole notebook either SoS acts too soon and the change gets overwritten by a default, or too late and whatever it is modifying isn't used to generate the actual interface elements. The simple mode switch happens with everything loaded, however, so the menu appears. But whatever it is doesn't seem linked to the kernel itself, but rather loading a notebook with that kernel.
I have the exact same config now as @gaow had when it worked in April, save that I have sos-python at 0.20.2, and I don't have jupyterlab-lsp at all.
The issue turns out to be an CSS issue caused by some CSS adjustment in Jupyterlab 4.2.1. I have released jupyterlab-sos 0.10.2. Please let me know if the new release works.
@BoPeng - This mostly fixes it for me. The conda package wasn't up yet, so I used pip install. Now 7.2.1 will load the menu on a new notebook! ~~But loading an old notebook leaves me without the menu. Furthermore, toggling simple mode no longer recovers it.~~ (Clicked around a little bit and realized the following:) Furthermore, I now only need to switch between cells to get the menu back when loading. (Toggling simple mode no longer does anything.)
So it seems fixed-enough to me now!
@Ichoran Please check if 0.10.3 has fixed #74.
@BoPeng - That fix works for me!
@BoPeng it works! However, if we have a very long command like this,
plink --bfile gwas_example_final --logistic hide-covar --covar gwas_example_final_pca.eigenvec --covar-number 1-10 --out gwas_example_final --ci 0.95
then the entire cell level kernel and other menus will be lost. I can only bring them back if we can make it multiple lines.
@dianacornejo at least it works for most of the case if you try it out -- fresh install might be better?