0
  • In Debian 11 I had installed jupyter lab with pip in my user directory, but on Debian 12 this is not possible anymore since Debian decided to follow pep-668 and python packages are marked as externally managed, you can only install system wide with the package manager (APT).

  • I installed python3-jupyterlab-server lab with APT, but it fails to start

     $ sudo apt reinstall python3-jupyterlab-server
    ...
    ...
    Preparing to unpack .../python3-jupyterlab-server_2.16.5-1_all.deb ...
    Unpacking python3-jupyterlab-server (2.16.5-1) over (2.16.5-1) ...
    Setting up python3-jupyterlab-server (2.16.5-1) ...
    
    $ jupyter lab
    Traceback (most recent call last):
      File "/usr/local/bin/jupyter-lab", line 5, in <module>
        from jupyterlab.labapp import main
    ModuleNotFoundError: No module named 'jupyterlab'
    
  • I installed Jupyter Lab with pip in a virtual environment and can successfully start it from there. Is this the only way?

I understand the value of virtual environments or conda for maintaining a lot of data analysis package. But Jupyter Lab is now a core component of the system, so I guess it should be installed system-wide with the system package manage (APT on Debian). I'm wondering what's wrong in my config, why can't I start jupyter lab when installed from apt?

Related questions:

Paul Rougieux
  • 10,289
  • 4
  • 68
  • 110
  • Could [JupyterLab Desktop](https://github.com/jupyterlab/jupyterlab-desktop) be a solution? It has deb packages available (but no ppa). – krassowski Aug 31 '23 at 14:48

1 Answers1

0

Have you tried installing pipx via apt and then installing it via pipx install jupyterlab?

It is an alternative way of installing packages mentioned in the first link.

  • I did try `pipx install jupyterlab` but `jupyter lab` failed to start yesterday. I had just done the Debian upgrade from bullseye 11 to bookworm 12. After a restart this morning `jupyter lab` does work now, thank you. – Paul Rougieux Sep 01 '23 at 08:26
  • The problem with pipx is that it can only install system-wide python applications that are meant to be started at the command line, such as `jupyter lab`. I still need to manage a separate jupyter kernel to install the required packages. So in the end I start a virtual environment `source /path_to_env/bin/activate`, install jupyter lab with pip in that environment and start `jupyter lab` from there, as I wrote in the original question. – Paul Rougieux Sep 01 '23 at 09:43
  • Ok, glad you got it working. Still curious why the "intended" way didn't work... – pathetic-lynx Sep 02 '23 at 11:15