jupyterlab-sos
jupyterlab-sos copied to clipboard
Install sos in an environment
Is there a way to install sos in a conda environment. I'm trying to install sos and elyra at the same time and it never works. I'm wondering if there is a way to install sos in an env. If I do get it to install right now... which happens occasionally depending on order of the installation I do not see the sos drop down combo box. I'm assuming this is jupyterlab 4.x related. I rolled the install back to 3.6.x but I never seems to install into the base environment correctly. Lastly, I'm building jupyterhub (not just lab).
Unfortunately, as reported by #65 as well, we do not yet support JupyterLab 4.x because it has some breaking API change that I currently do not have time to investigate. The only way to proceed is to use JupyterLab 3.x, which we have been using in a JupyterHub environment successfully.
I will see if I can have another look at JupyterLab 4.x this weekend.
My real question should have been. Can I install sos in a conda environment under jupytehub. I have tried several ways but it never seems to work. I can see it in the notebook but not the lab. Do you have an example conda environment I can use to test the install? Thanks
I may have to consult our admin for this but as far as I remember, he installed jupyterhub using a conda environment, and then I used pip install to install sos related stuff to the conda environment on which jupyterhub/jupyterlab is running. I used pip instead of conda for installation because the pip versions are more up to date. (e.g. the latest version of sos-r is not available from conda-forge).
JLab 4.x is now (partially) supported.
@BoPeng... thanks for the update. I'm trying my best to install SoS. It's not happening anymore. I have spent hours trying to install this on windows, linux, using both conda and pip methods. I cannot get any working environments. Would you happen to have a working environment you could share? Regards,
Please be more specific about what you have done, which versions of packages you have installed so that I can better assist you. But in general,
- you can use the sos docker image (https://vatlab.github.io/sos-docs/running.html#content) if you can use docker. It is not updated for JLab 4.x but it works.
- You need to use a new conda environment so that I can reproduce your problem. The installation is actually pretty easy usually. WIthout checking syntax etc,
conda create --name jlab python=3.10 -y
cona activate jlab
pip install jupyterlab jupyterlab-sos sos-python
python -m sos_notebook.install
If things do not work, send me the output of
pip list | grep jupyter
pip list | grep sos
jupyter kernelspec list
jupyter labextension list
Bo… thanks for getting back to me.. Here is my output. Please take a look and let me know if you see anything. I have tried this across several os.
(jlab) root@093caf6696ac:/# pip list | grep jupyter jupyter_client 8.3.1 jupyter_core 5.3.2 jupyter-events 0.7.0 jupyter-lsp 2.2.0 jupyter_server 2.7.3 jupyter_server_terminals 0.4.4 jupyterlab 4.0.6 jupyterlab-pygments 0.2.2 jupyterlab_server 2.25.0 jupyterlab_sos 0.10.0
(jlab) root@093caf6696ac:/# pip list | grep sos jupyterlab_sos 0.10.0 sos 0.24.3 sos-notebook 0.24.4 sos-python 0.20.0
(jlab) root@093caf6696ac:/# jupyter kernelspec list Available kernels: python3 /opt/conda/envs/jlab/share/jupyter/kernels/python3 sos /usr/local/share/jupyter/kernels/sos
(jlab) root@093caf6696ac:/# jupyter labextension list JupyterLab v4.0.6 /opt/conda/envs/jlab/share/jupyter/labextensions jupyterlab_pygments v0.2.2 enabled X (python, jupyterlab_pygments) jupyterlab-sos v0.8.9 enabled OK (python, jupyterlab_sos) transient-display-data v0.4.4 enabled OK (python, transient-display-data) @jupyter-notebook/lab-extension v7.0.4 enabled OK
The following extensions are outdated: jupyterlab_pygments
Consider checking if an update is available for these packages.
Here is a snapshot of what Im seeing when I use the %get from python. I hope I’m not missing something but the dependencies never seems to work out.
Thanks for the help,
First the version of jupyterlab-sos does not look right, pip says 0.10.0, but labextension says 0.8.9 . Then, do you see the right hand side kernel selector from jupyterlab? I do not see it from your screenshot. The output of %use from jupyter will also show status of available kernels.
Bo... I tried the docker image and the same thing is happening. See the included image. This is from a fresh build of the docker image on Linux. You can see that the python kernel is not able to '%get' but in the next cell you can see that R works fine.
I have this issue no matter the OS or install method. Thanks,
On mac,
Bo... I have tried this everywhere today, aws, linux, docker, no docker, and windows (I don't have a mac...). All of the kernels I have installed work but python. Any chance you might ask someone to run this on a linux or windows box to verify what I'm seeing or even try the sos docker image. This has been an issue for over a year, I kept thinking it was my installation causing the problem (still could be...) but tried conda, pip, virtualenv, basic jupyterlab installs on several linux flavors. The kicker for me was pulling the sos docker image with the same result right out of the build.
Thanks for all your help here, I really like SoS and wanted to start up again but I'm stuck....
Thank you for your patience. There are many moving pieces with jupyter and sos-notebook but I can now reproduce the problem with the official docker image. Let me check what is going on.
This turns out to be an issue of sos-python with python >= 3.10. Please update sos-python to 0.20.2 and see if the problem persists.
YES!!!! That was a tough one. Thank you for sticking with me here. The python integration is working now on windows and linux...