JupyterLab application assets not found
Asked Answered
K

2

14

I just downloaded jupyter lab using pip on my macbook. When I run jupyter lab on my terminal, browser opens with the following error:

JupyterLab Error JupyterLab application assets not found in "/opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/share/jupyter/lab" Please run jupyter lab build or use a different app directory

I can run jupyter notebook with no problem.

Note: I can use jupyter lab by running jupyter lab --code-mode

Kingdon answered 8/9, 2022 at 8:21 Comment(4)
Do you also use pyenv?Crockett
No, I don't use pyenv, didn't install it.Kingdon
I had a similar issue. The problem was that jupyter was configured with an non-existent virtual environment. Compare the output of jupyter --paths with the location of your current Python interpreter which python3. You probably see that the paths under "config" differ from the location of your interpreter.Crockett
I believe that was the reason. Now that I use conda for environment management, I don't have that problem anymore. Both python3 and jupyter paths are in anaconda folder. Thank you for explaning the reasonKingdon
E
30

This issue can be resolved by manually set the application directory: jupyter lab --app-dir /opt/homebrew/share/jupyter/lab, replace /opt/homebrew with the actual homebrew path.

Encountered this issue when installing jupyterlab with pip3.

Euphemia answered 11/11, 2022 at 10:21 Comment(6)
How to permanently fix this? I.e. setting for app-dirStatesmanship
How do I work out what the correct path should be? (I also got this error when installing with pip3).Parrotfish
Here is permanently fixing solution. Runjupyter lab --generate-config. Then config file is created with printing location of the file(eg. Writing default config to: /Users/blabla/.jupyter/jupyter_lab_config.py). Open the config file and modify content into c.LabApp.app_dir = '/opt/homebrew/share/jupyter/lab'. That's all. @LukaBradeškoJohppah
On Linux/linuxbrew (Homebrew 4.1.16) was jupyter lab --app-dir /home/linuxbrew/.linuxbrew/share/jupyter/labHighcolored
What about for WSL2? My path in the error is this: /home/bexgboost/.local/share/jupyter/labTrstram
I ran jupyter lab build to get the path before writing in the config. Without doing this, extensions were not getting installed. Hope this helps someone in the future to save time.Egor
A
-1

Please run conda install jupyterlab instead. I tried this on with miniforge (https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh) and it worked.

Addle answered 13/11, 2022 at 16:43 Comment(1)
I don't have any expertise here, so I can't speak to why this answer was downvoted, but this was the only thing that fixed it for me, so- thanks!Denude

© 2022 - 2024 — McMap. All rights reserved.