Settings not picked up by JupyterLab

I am setting up Jupyterhub to front jupyterlab for the first time and I am having trouble propagating config to jupyterlab, specifically c.LabAll.app_dir

I brought in and added some debugging information into traitlets so I can see what config files it is loading and the results

contents of /tmp/

c.JupyterHub.authenticator_class = 'dummy'
c.Spawner.default_url = '/lab'

contents of /local/home/cladam/.jupyter/

c.LabApp.app_dir = '/my/env/share/jupyter/lab'
$ jupyterhub --config=/tmp/
... successful startup omitted ...

[I 2020-04-27 03:48:17.774 JupyterHub app:2631] JupyterHub is now running at http://:8000
[I 2020-04-27 03:48:26.657 JupyterHub log:174] 302 GET / -> /hub/ (@::ffff: 1.67ms
[I 2020-04-27 03:48:26.839 JupyterHub log:174] 302 GET /hub/ -> /hub/spawn (adam@::ffff: 10.70ms
[I 2020-04-27 03:48:27.201 JupyterHub spawner:1417] Spawning jupyterhub-singleuser --port=41975 --NotebookApp.default_url=/lab
[I 2020-04-27 03:48:30.680 JupyterHub log:174] 302 GET /hub/spawn -> /hub/spawn-pending/adam (adam@::ffff: 3507.27ms
[I 2020-04-27 03:48:30.705 JupyterHub log:174] 200 GET /hub/error/503?url=%2Fhub%2Fspawn (@ 40.76ms
[I 2020-04-27 03:48:30.705 JupyterHub pages:174] Server adam is already active
[I 2020-04-27 03:48:30.706 JupyterHub log:174] 302 GET /hub/spawn -> /hub/spawn-pending/adam (adam@::ffff: 40.33ms
[I 2020-04-27 03:48:31.038 JupyterHub pages:347] adam is pending spawn
[I 2020-04-27 03:48:31.041 JupyterHub log:174] 200 GET /hub/spawn-pending/adam (adam@::ffff: 5.53ms

found config witb <class 'traitlets.config.loader.PyFileConfigLoader'> at /local/home/adam/.jupyter/
{'LabApp': {'app_dir': '/my/env/share/jupyter/lab'}}
found config witb <class 'traitlets.config.loader.JSONFileConfigLoader'> at /local/home/adam/.jupyter/jupyter_notebook_config.json
{'NotebookApp': {'nbserver_extensions': {'jupyterlab': True}}}

[I 2020-04-27 03:48:32.464 SingleUserNotebookApp extension:158] JupyterLab extension loaded from /my/env/lib/python3.6/site-packages/jupyterlab
[I 2020-04-27 03:48:32.464 SingleUserNotebookApp extension:159] JupyterLab application directory is /my/env/python3.6/share/jupyter/lab
[E 2020-04-27 03:48:32.464 SingleUserNotebookApp extension:181] JupyterLab application assets not found in "/my/env/python3.6/share/jupyter/lab"
[E 2020-04-27 03:48:32.464 SingleUserNotebookApp extension:181] Please run `jupyter lab build` or use a different app directory

LabApp doesn’t seem to be picking up my settings, even though it looks like it is reading the config file.

How is this supposed to work? what is the correct way to configure various parts of jupyter*?

I’m having a similar issue. Since Python on the main CentOS 7 repositories is stuck on 3.6, I’ve installed 3.8 via SCL.

I have JupyterHub up and running after changing some of the existing configurations I already had, but I cannot get JupyterLab to spawn. Navigating to /lab provides a 404 error. JupyterHub works fine.

jupyterhub: [I 2020-08-19 12:58:30.013 SingleUserNotebookApp log:174] 302 GET /user/vagrant/ -> /user/vagrant/lab?
jupyterhub: [W 2020-08-19 12:58:30.136 SingleUserNotebookApp log:174] 404 GET /user/vagrant/lab? 

I’ve tried setting c.LabApp.app_dir to where the JupyterLab application directory is, but I’m not getting anywhere either.

The only other documented case of redirecting the application directory I’ve seen is overriding the JUPYTERLAB_DIR environment variable to point to the directory, I’ve tried this also with no luck, but I have only seen it used specific to solo JupyterLab instances, not running alongside JupyterHub.

Is anyone able to advise?

Edit: Resolved my issue.

In my case I had to enable the jupyterlab extension, something I didn’t need to do on non-SCL builds.

jupyter serverextension enable --py jupyterlab --system

I enabled this system-wide as multiple users will be utilising the system, but if only required on a user-tp-user basis, you can use --user.

This is my very first post to the Jupyter Discourse Forum, so apologies if I am doing something wrong.

I did a brand new install of (mini)conda yesterday. I installed Jupyter Lab (among other programs), ran ‘jupyter lab --generate-config’ and ‘jupyter serverextension enable --py jupyterlab --user’, but Jupyter Lab crashes with the error message ‘Bad config encountered during initialization: Trait, server_extensions, not found.’. I am running conda on stock Linux Mint, fully updated. I decided to resurrect this old thread (which I found by googling) because it seems to me that the new configuration required of Jupyter Lab somehow is not picking the libraries it needs.