Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a custom Python environment does not work on first launch #473

Closed
Feuermurmel opened this issue Aug 6, 2022 · 21 comments
Closed

Comments

@Feuermurmel
Copy link

Feuermurmel commented Aug 6, 2022

Description

I'm running JupyterLab 3.3.4-2 for the first time and trying to re-use my existing Python 3.10 environment installed via Homebrew but after selecting the Python interpreter and selecting Apply and restart, the dialog simply re-appears.

When starting JupyterLab, this dialog is shown:

image

There, I select the Python binary from my Python 3.10 installation with jupyterlab 3.4.4 installed and select Apply and restart. JupyterLab closes and re-opens and displays the same dialog again. The message stays the same:

Failed to find a compatible Python environment at the configured path "/Users/michi/Library/jupyterlab-desktop/jlab_server/bin/python".

So maybe the configured path doesn't get saved before re-opening the application?

Context

I'm running macOS 12.4 on an Apple M1 Mac. I've installed Python with the usual brew install python@3.10 and brew link python@3.10. I'm using a custom Homebrew prefix to workaround an issue in Homebrew.

michi ~$ brew --prefix
/Users/michi/opt/homebrew
michi ~$ sw_vers
ProductName:	macOS
ProductVersion:	12.4
BuildVersion:	21F79
michi ~$ brew --prefix
/Users/michi/opt/homebrew
michi ~$ python3 --version
Python 3.10.5
michi ~$ which python3
/Users/michi/opt/homebrew/bin/python3
michi ~$ python3 -m pip list | grep jupyterlab
jupyterlab           3.4.4
jupyterlab-pygments  0.2.2
jupyterlab-server    2.15.0
Troubleshoot Output
michi ~$ jupyter troubleshoot
$PATH:
	/opt/local/bin
	/opt/local/sbin
	/Users/michi/opt/bin/native/Darwin
	/Users/michi/opt/bin
	/Users/michi/Library/Python/3.10/bin
	/Users/michi/.pyenv/shims
	/Users/michi/.cargo/bin
	/Users/michi/opt/homebrew/bin
	/Users/michi/opt/homebrew/sbin
	/Users/michi/.local/bin
	/usr/local/bin
	/usr/local/bin
	/usr/bin
	/bin
	/usr/sbin
	/sbin
	/Library/Apple/usr/bin

sys.path:
/Users/michi/opt/homebrew/bin
/Users/michi/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python310.zip
/Users/michi/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10
/Users/michi/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/lib-dynload
/Users/michi/Library/Python/3.10/lib/python/site-packages
/Users/michi/opt/homebrew/lib/python3.10/site-packages

sys.executable:
/Users/michi/opt/homebrew/opt/python@3.10/bin/python3.10

sys.version:
3.10.5 (main, Aug 6 2022, 11:45:06) [Clang 13.1.6 (clang-1316.0.21.2.5)]

platform.platform():
macOS-12.4-arm64-arm-64bit

which -a jupyter:
/Users/michi/Library/Python/3.10/bin/jupyter
/Users/michi/opt/homebrew/bin/jupyter

pip list:
Package Version
-------------------- ------------------
anyio 3.6.1
appnope 0.1.3
archive 0.1.dev22+g17d3c8b
archive-project 0.1.dev6+ga80f2d0
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
arrow 1.2.2
asttokens 2.0.5
attrs 22.1.0
Babel 2.10.3
backcall 0.2.0
beautifulsoup4 4.11.1
binaryornot 0.4.4
bleach 5.0.1
certifi 2022.6.15
cffi 1.15.1
chardet 5.0.0
charset-normalizer 2.1.0
click 8.1.3
cookiecutter 2.1.1
debugpy 1.6.2
decorator 5.1.1
defusedxml 0.7.1
dirwatch 0.1
entrypoints 0.4
executing 0.9.1
fastjsonschema 2.16.1
git-toxic 0.1
idna 3.3
ipykernel 6.15.1
ipython 8.4.0
ipython-genutils 0.2.0
jedi 0.18.1
Jinja2 3.1.2
jinja2-time 0.2.0
json5 0.9.9
jsonschema 4.9.1
jupyter-client 7.3.4
jupyter-core 4.11.1
jupyter-server 1.18.1
jupyterlab 3.4.4
jupyterlab-pygments 0.2.2
jupyterlab-server 2.15.0
MarkupSafe 2.1.1
matplotlib-inline 0.1.3
mistune 0.8.4
nbclassic 0.4.3
nbclient 0.6.6
nbconvert 6.5.0
nbformat 5.4.0
nest-asyncio 1.5.5
notebook 6.4.12
notebook-shim 0.1.0
packaging 21.3
pandocfilters 1.5.0
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
pip 22.1.2
prometheus-client 0.14.1
prompt-toolkit 3.0.30
psutil 5.9.1
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.21
pyfswatch 0.1
Pygments 2.12.0
pyparsing 3.0.9
pyrsistent 0.18.1
python-dateutil 2.8.2
python-slugify 6.1.2
pytz 2022.1
PyYAML 6.0
pyzmq 23.2.0
r 0.1
requests 2.28.1
Send2Trash 1.8.0
setuptools 62.6.0
six 1.16.0
sniffio 1.2.0
soupsieve 2.3.2.post1
stack-data 0.3.0
terminado 0.15.0
text-unidecode 1.3
tinycss2 1.1.1
toml 0.10.2
tornado 6.2
traitlets 5.3.0
urllib3 1.26.11
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.3.3
wheel 0.37.1
youtube-dl 2021.12.17

Browser Output (required for interface issues after loading) image
(I'm not sure if this helps)
Logs (required for issues with loading, server and startup)

I didn't find jlab on my $PATH so I used this command instead:

michi ~$ /Users/michi/Downloads/JupyterLab.app/Contents/MacOS/JupyterLab --verbose 4
[2022-08-06 14:25:43.109] [info]  In production mode
[2022-08-06 14:25:43.126] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 14:25:43.306] [error] (node:25789) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 14:25:43.834] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 14:25:43.835] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 14:25:44.106] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 14:25:44.173] [info]  checking-for-update
[2022-08-06 14:25:45.311] [error] There was a problem updating the application
[2022-08-06 14:25:45.313] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 14:25:45.315] [info]  updater error
[2022-08-06 14:25:45.318] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 14:35:43.896] [info]  checking-for-update
[2022-08-06 14:35:44.366] [error] There was a problem updating the application
[2022-08-06 14:35:44.376] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 14:35:44.379] [info]  updater error
[2022-08-06 14:35:44.379] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 14:45:43.898] [info]  checking-for-update
[2022-08-06 14:45:44.358] [error] There was a problem updating the application
[2022-08-06 14:45:44.359] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 14:45:44.360] [info]  updater error
[2022-08-06 14:45:44.362] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 14:55:43.938] [info]  checking-for-update
[2022-08-06 14:55:44.420] [error] There was a problem updating the application
[2022-08-06 14:55:44.424] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 14:55:44.432] [info]  updater error
[2022-08-06 14:55:44.432] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:05:43.946] [info]  checking-for-update
[2022-08-06 15:05:44.422] [error] There was a problem updating the application
[2022-08-06 15:05:44.426] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:05:44.427] [info]  updater error
[2022-08-06 15:05:44.428] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:15:36.346] [error] Error: JupyterLab did not save state successfully
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/app.js:233:46
[2022-08-06 15:15:38.547] [info]  In production mode
[2022-08-06 15:15:38.570] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 15:15:38.752] [error] (node:41425) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 15:15:39.290] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 15:15:39.291] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 15:15:39.545] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 15:15:39.604] [info]  checking-for-update
[2022-08-06 15:15:40.473] [error] There was a problem updating the application
[2022-08-06 15:15:40.475] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:15:40.477] [info]  updater error
[2022-08-06 15:15:40.479] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:16:27.889] [error] Error: JupyterLab did not save state successfully
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/app.js:233:46
[2022-08-06 15:16:29.674] [info]  In production mode
[2022-08-06 15:16:29.690] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 15:16:29.867] [error] (node:41573) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 15:16:30.301] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 15:16:30.302] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 15:16:30.548] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 15:16:30.607] [info]  checking-for-update
[2022-08-06 15:16:31.245] [error] There was a problem updating the application
[2022-08-06 15:16:31.247] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:16:31.249] [info]  updater error
[2022-08-06 15:16:31.251] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:26:30.343] [info]  checking-for-update
[2022-08-06 15:26:30.823] [error] There was a problem updating the application
[2022-08-06 15:26:30.845] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:26:30.852] [info]  updater error
[2022-08-06 15:26:30.852] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:36:30.345] [info]  checking-for-update
[2022-08-06 15:36:30.841] [error] There was a problem updating the application
[2022-08-06 15:36:30.843] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:36:30.844] [info]  updater error
[2022-08-06 15:36:30.845] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:46:30.327] [info]  checking-for-update
[2022-08-06 15:46:30.798] [error] There was a problem updating the application
[2022-08-06 15:46:30.800] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:46:30.802] [info]  updater error
[2022-08-06 15:46:30.802] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:54:21.040] [info]  In production mode
[2022-08-06 15:54:21.063] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 15:54:21.249] [error] (node:44064) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 15:54:21.804] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 15:54:21.805] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 15:54:22.076] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 15:54:22.132] [info]  checking-for-update
[2022-08-06 15:54:31.988] [error] There was a problem updating the application
[2022-08-06 15:54:31.991] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:54:31.993] [info]  updater error
[2022-08-06 15:54:31.996] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:56:10.377] [info]  In production mode
[2022-08-06 15:56:10.396] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 15:56:10.567] [error] (node:44295) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 15:56:11.061] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 15:56:11.062] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 15:56:11.315] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 15:56:11.363] [info]  checking-for-update
[2022-08-06 15:56:14.124] [error] There was a problem updating the application
[2022-08-06 15:56:14.126] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:56:14.128] [info]  updater error
[2022-08-06 15:56:14.130] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:00:06.451] [info]  In production mode
[2022-08-06 16:00:06.468] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 16:00:06.652] [error] (node:44553) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 16:00:07.108] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 16:00:07.109] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 16:00:07.359] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 16:00:07.456] [info]  checking-for-update
[2022-08-06 16:00:10.221] [error] There was a problem updating the application
[2022-08-06 16:00:10.222] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:00:10.225] [info]  updater error
[2022-08-06 16:00:10.227] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:01:57.594] [info]  In production mode
[2022-08-06 16:01:57.612] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 16:01:57.791] [error] (node:44745) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 16:01:58.238] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 16:01:58.239] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 16:01:58.490] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 16:01:58.583] [info]  checking-for-update
[2022-08-06 16:02:01.292] [error] There was a problem updating the application
[2022-08-06 16:02:01.294] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:02:01.297] [info]  updater error
[2022-08-06 16:02:01.299] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:07:58.620] [info]  In production mode
[2022-08-06 16:07:58.643] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 16:07:58.831] [error] (node:45144) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 16:07:59.398] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 16:07:59.399] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 16:07:59.652] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 16:07:59.740] [info]  checking-for-update
[2022-08-06 16:08:02.557] [error] There was a problem updating the application
[2022-08-06 16:08:02.559] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:08:02.561] [info]  updater error
[2022-08-06 16:08:02.563] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:08:45.344] [info]  In production mode
[2022-08-06 16:08:45.361] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 16:08:45.536] [error] (node:45299) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 16:08:46.012] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 16:08:46.012] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 16:08:46.336] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 16:08:46.447] [info]  checking-for-update
[2022-08-06 16:08:49.292] [error] There was a problem updating the application
[2022-08-06 16:08:49.295] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:08:49.298] [info]  updater error
[2022-08-06 16:08:49.300] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:09:33.565] [info]  In production mode
[2022-08-06 16:09:33.583] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 16:09:33.771] [error] (node:45613) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 16:09:34.287] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 16:09:34.288] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 16:09:34.569] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 16:09:34.685] [info]  checking-for-update
[2022-08-06 16:09:35.402] [error] There was a problem updating the application
[2022-08-06 16:09:35.404] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:09:35.406] [info]  updater error
[2022-08-06 16:09:35.410] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:14:35.712] [error] Error: JupyterLab did not save state successfully
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/app.js:233:46
[2022-08-06 16:14:37.502] [info]  In production mode
[2022-08-06 16:14:37.518] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 16:14:37.691] [error] (node:46015) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 16:14:38.184] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 16:14:38.185] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 16:14:38.421] [error] Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 16:14:38.489] [info]  checking-for-update
[2022-08-06 16:14:39.178] [error] There was a problem updating the application
[2022-08-06 16:14:39.179] [error] Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:14:39.181] [info]  updater error
[2022-08-06 16:14:39.184] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 16:14:53.222] [error] Error: JupyterLab did not save state successfully
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/app.js:233:46
[2022-08-06 16:15:37.269] [info]  In production mode
[2022-08-06 16:15:37.290] [info]  Logging to file (/Users/michi/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2022-08-06 16:15:37.543] [error] (node:46160) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2022-08-06 16:15:37.983] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.3.4-2
[2022-08-06 16:15:37.985] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2022-08-06 16:15:38.129] [error] Error: Command failed: ln -s /Users/michi/Downloads/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/Users/michi/Downloads/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /Users/michi/Downloads/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-06 16:15:38.193] [info]  checking-for-update
[2022-08-06 16:15:39.110] [info]  update-not-available
[2022-08-06 16:16:33.827] [error] Error: JupyterLab did not save state successfully
    at /Users/michi/Downloads/JupyterLab.app/Contents/Resources/app.asar/build/out/main/app.js:233:46
@welcome
Copy link

welcome bot commented Aug 6, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@Feuermurmel Feuermurmel changed the title Settin a custom Python environment does not work on first launch Setting a custom Python environment does not work on first launch Aug 6, 2022
@Feuermurmel
Copy link
Author

I have a hunch that this was due to a stray symlink under ~/.ipython (haven't tested that the problem is resolved now though). Maybe you can reproduce it by adding ln -s /foo/bar ~/.ipython. I think such a failure case should produce some visible error message (e.g. a notification popping up "Hey, an internal error happened, maybe you can figure it out by looking at this error output!")

@krassowski
Copy link
Member

It appears to be the same issue as in #454 (which should not get closed as the problem was not resolved). The relevant log is:

Error: Command failed: ln -s /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:835:11)
    at Object.execSync (node:child_process:909:15)
    at Object.execSync (node:electron/js2c/asar_bundle:5:12692)
    at setupJLabCommand (/private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:177:25)
    at /private/var/folders/fq/2y7p86gs1qb98jp_cq5n90f80000gp/T/AppTranslocation/63B98877-0DD9-450F-B5EF-AB9C79CA8387/d/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:192:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

and corresponding section in code:

function setupJLabCommand() {
if (process.platform !== 'darwin') {
return;
}
const symlinkPath = '/usr/local/bin/jlab';
const targetPath = `${getAppDir()}/app/jlab`;
if (fs.existsSync(symlinkPath) || !fs.existsSync(targetPath)) {
return;
}
try {
const cmd = `ln -s ${targetPath} ${symlinkPath}`;
execSync(cmd, { shell: '/bin/bash' });
fs.chmodSync(symlinkPath, 0o755);
fs.chmodSync(targetPath, 0o755);
} catch (error) {
log.error(error);
}
}

As for failing to save the state, this is what I think the logs suggest:

[2022-08-06 15:05:44.428] [info]  Error: Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. See https://github.com/Squirrel/Squirrel.Mac/issues/182 for more information.
[2022-08-06 15:15:36.346] [error] Error: JupyterLab did not save state successfully

@Feuermurmel would you be able to check if /usr/local/bin/ is writeable (e.g. can you create the symlink to another file manually)? Is your application in the Downloads directory, or is that warning wrong? Is it on a read-only volume?

@Feuermurmel
Copy link
Author

/usr/local/bin/ is not writable here:

michi ~$ ls -ld /usr/local/bin/
drwxr-xr-x@ 16 root  wheel  512 10 Feb 17:23 /usr/local/bin/
michi ~$ touch /usr/local/bin/foobar
touch: /usr/local/bin/foobar: Permission denied

And yes, App Translocation was definitely active in that circumstance as I did not move the app out of ~/Downloads before launching it.

@mbektas
Copy link
Member

mbektas commented Dec 10, 2022

@Feuermurmel this should be fixed now with v3.5.1-1. could you test and update the issue?

@Feuermurmel
Copy link
Author

Feuermurmel commented Dec 25, 2022

I tried to re-create the issue with version 3.5.1-1, the dialog doesn't re-appear after setting the Python path but now I'm stuck at this empty window, so I can't really confirm that the issue is fixed:

image

Should I open another issue for this or is this already known?

@mbektas
Copy link
Member

mbektas commented Dec 25, 2022

@Feuermurmel looks like JupyterLab Server is failing to launch from your custom environment. We will be improving the error handling for the case you are running into. Can you check couple of things:

  1. Do you happen to have any spaces in the custom environment path? That is not supported at the moment but I am working on a fix.

  2. Can you check if there are any relevant logs related to server launch in ~/Library/Logs/jupyterlab-desktop/main.log?

  3. Based on your logs above, I am noticing that the application is not in /Applications directory. If you use dmg installer, then app should have been installed there. Any particular reason for this?

  4. To get out of this state you can remove pythonPath field or set to empty string in jupyterlab-desktop-data file (in ~/Library/jupyterlab-desktop/jupyterlab-desktop-data). It will reset Python environment to the bundled one.

  5. Can you manually launch the server from a terminal after activating your custom environment and see if there are any errors? using the command:

python -m jupyterlab --no-browser --expose-app-in-browser --JupyterApp.config_file_name="" --ServerApp.port=8888 --ServerApp.password="" --ServerApp.allow_origin="*" --ContentsManager.allow_hidden=True

@marc-medley
Copy link

@mbektas I am also encoutering the same "Failed to find a compatible Python environment…" issue when attempting to do a clean install of "JupyterLab.app" such that it uses an existing homebrew installation of Python3. If possible, I am attempting minimize the number of Python installations on my system.

Screenshot 2023-01-17 at 1 53 11 PM

Here is the information that I have related to your questions.

  1. Do you happen to have any spaces in the custom environment path?

No spaces.

/opt/homebrew/bin/python3

Each of the following also produced the same error:

/opt/homebrew/bin/python3.11
/opt/homebrew/Cellar/python@3.10/3.10.9/bin/python3
/opt/homebrew/Cellar/python@3.11/3.11.1/bin/python3.11
  1. Can you check if there are any relevant logs related to server launch in ~/Library/Logs/jupyterlab-desktop/main.log?

main.log

[2023-01-17 13:49:16.545] [info]  In production mode
[2023-01-17 13:49:16.555] [info]  Logging to file (/Users/accountname/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2023-01-17 13:49:16.660] [error] (node:28582) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2023-01-17 13:49:16.919] [error] Error: Command failed: ln -s /Applications/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:865:11)
    at Object.execSync (node:child_process:936:15)
    at Object.execSync (node:electron/js2c/asar_bundle:2:12709)
    at setupJLabCommand (/Applications/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:134:29)
    at /Applications/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:182:9
[2023-01-17 13:49:17.303] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/3.5.1-1
[2023-01-17 13:49:17.304] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2023-01-17 13:49:17.454] [info]  checking-for-update
[2023-01-17 13:49:18.337] [info]  update-not-available
[2023-01-17 13:59:17.329] [info]  checking-for-update
[2023-01-17 13:59:17.671] [info]  update-not-available
  1. … If you use dmg installer, then …

Is there a link somewhere for a JupyterLab dmg installer?? (I was only finding pip instructions, a homebrew formula and a homebrew application cask.)

brew info --cask jupyterlab

# ==> jupyterlab: 3.5.1-1
# https://github.com/jupyterlab/jupyterlab-desktop
# /opt/homebrew/Caskroom/jupyterlab/3.5.1-1 (124B)
# From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/jupyterlab.rb
# ==> Name
# JupyterLab App
# ==> Description
# Desktop application for JupyterLab
# ==> Artifacts
# JupyterLab.app (App)

I installed JupyterLab.app as a homebrew applicaton cask. The reason being that periodic a brew update; brew upgrade will also keep the .app version updated.

brew install --cask jupyterlab

The homebrew cask desktop application install does put the app in /Applications/JupyterLab.app, as would a .dmg drag & drop install to the Applications folder.

  1. pythonPath … set to empty string in jupyterlab-desktop-data file (in ~/Library/jupyterlab-desktop/jupyterlab-desktop-data). It will reset Python environment ….

I am working with a clean install such that pythonPath is empty.

"pythonPath":""
  1. Can you manually launch the server from a terminal after activating your custom environment and see if there are any errors? using the command:
python -m jupyterlab --no-browser --expose-app-in-browser --JupyterApp.config_file_name="" --ServerApp.port=8888 --ServerApp.password="" --ServerApp.allow_origin="*" --ContentsManager.allow_hidden=True

Note: python is not (yet) defined on my system. The machine started as a clean install of macOS Ventura 13.1 running on Apple Silicon. Standard Xcode and various commandline tools (homebrew utilities) are installed. This includes python3 (currently pointing to python3.10), python3.9, python3.10, and python3.11

which -a python
# python not found

which -a python3
# /opt/homebrew/bin/python3
# /usr/bin/python3
python3 --version
# Python 3.10.9

which -a python3.11
# /opt/homebrew/bin/python3.11
python3.11 --version
# Python 3.11.1

So, using python3 and python3.11 the following resulted:

python3 -m jupyterlab --no-browser --expose-app-in-browser …
# /opt/homebrew/opt/python@3.10/bin/python3.10: No module named jupyterlab
python3.11 -m jupyterlab --no-browser --expose-app-in-browser …
/opt/homebrew/opt/python@3.11/bin/python3.11: No module named jupyterlab

Should it be somehow possible for JupyterLab.app to use a homebrew python installation?

@mbektas
Copy link
Member

mbektas commented Jan 18, 2023

@marc-medley you can get dmg installers from here, and macOS version already has auto-update feature, it can automatically upgrade to latest version released. but that is not your issue here. brew install --cask jupyterlab seems to install the same dmg as well.

JupyterLab Desktop requires a Python environment with jupyterlab (>=3.4.5) Python package. It ships with a bundled installer to create that required environment. Your python installation created using homebrew doesn't have jupyterlab python package. You should be able to install using
python3 -m pip install jupyterlab

@mgiugliano
Copy link

I have the same issue (home-brew on Mac Intel). I would have loved to use jupyterlab desktop for teaching, and have people with no computer skills to get up and working with Jupyter. It does not seem to be the case yet. Thank you anyway for this project I will keep an eye on it.

@krassowski
Copy link
Member

@mgiugliano would you mind filling in the issue template with full details? There were major changes since and there is a chance that your issue is different. Have you confirmed that the custom environment has the latest JupyterLab version installed?

@ashishmahalka
Copy link

@marc-medley you can get dmg installers from here, and macOS version already has auto-update feature, it can automatically upgrade to latest version released. but that is not your issue here. brew install --cask jupyterlab seems to install the same dmg as well.

JupyterLab Desktop requires a Python environment with jupyterlab (>=3.4.5) Python package. It ships with a bundled installer to create that required environment. Your python installation created using homebrew doesn't have jupyterlab python package. You should be able to install using python3 -m pip install jupyterlab

Can this be mentioned somewhere in the steps to install. JupyterLab Desktop recognized my python environment only when I installed jupyterlab in it.

@mgiugliano
Copy link

What's the point of Jupyter Desktop if you need to have a python + jupyterlab environment?

Apologies for my stupid question, as I certainly missed or misunderstood key information.

@krassowski
Copy link
Member

What's the point of Jupyter Desktop if you need to have a python + jupyterlab environment?

JupyterLab Desktop ships with a Python environment which includes JupyterLab, but as you mention, using JupyterLab from a custom environment currently requires having JupyterLab installed in that environment (I am not a fan of this either). Two points:

  • to enable extensions per-environment it is currently necessary to have per-environment jupyterlab installation -but there is no reason it should be like that in the future (it just requires someone to help implement wider changes in extension management, which will be possible with JupyterLab 4.0)
  • if you don't need per-environment extensions you could just use conda-nb-kernels (or similar kernel discovery tool) which only requires having per-environment ipykernel (or other) installation.

@mbektas who is the main maintainer may have a different opinion based on their in-and-out knowledge of the underlying machinery, but again, I agree that from the UX point we should not require installing JupyterLab in every environment (or if it absolutely has to be done, we should be able to silently install/update it after user's consent).

@krassowski
Copy link
Member

UX-wise I proposed how the requirements communication could be improved in #479.

@iDmple
Copy link

iDmple commented Apr 12, 2023

I tried to re-create the issue with version 3.5.1-1, the dialog doesn't re-appear after setting the Python path but now I'm stuck at this empty window, so I can't really confirm that the issue is fixed:

image

Should I open another issue for this or is this already known?

We are having the same problem, or at least the same symptoms.

@cmdedj
Copy link

cmdedj commented May 31, 2023

i have the problem too.when i set the python path, i open the app , it will quit

`/Applications/JupyterLab.app/Contents/MacOS/JupyterLab ; exit;
ln: /usr/local/bin/jlab: No such file or directory

Saving session...completed.`

@ewa
Copy link

ewa commented Jun 29, 2023

I'm getting essentially the same error, also on MacOS, but from a "clean" installation (I think) of 4.0.1-1, without a custom python environment or installation from HomeBrew. I did have a previous version installed at one point and I think I got rid of all the traces of it, but can't guarantee that.

Should I start a separate ticket or discuss it here?

When I try to start the application by clicking on the icon, it pops up briefly and then disappears. Starting from the command line, I get this:

ewa-mbp:~/Library andersoe % /Applications/JupyterLab.app/Contents/MacOS/JupyterLab
ln: /usr/local/bin/jlab: Permission denied```

The log file (~/Library/Logs/jupyterlab-desktop/main.log) ends with this, which looks like the same problem:

[2023-06-29 12:16:48.118] [error] Error: Command failed: ln -s /Applications/JupyterLab.app/Contents/Resources/app/jlab /usr/local/bin/jlab
ln: /usr/local/bin/jlab: Permission denied

    at checkExecSyncError (node:child_process:911:11)
    at Object.execSync (node:child_process:983:15)
    at Object.execSync (node:electron/js2c/asar_bundle:2:12711)
    at setupJLabCommand (/Applications/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:151:29)
    at /Applications/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:199:9
[2023-06-29 12:16:48.122] [error] SyntaxError: Unexpected token 'E', "EXEC:ERROR" is not valid JSON
    at JSON.parse (<anonymous>)
    at Registry.getEnvironmentInfoSync (/Applications/JupyterLab.app/Contents/Resources/app.asar/build/out/main/registry.js:303:30)
    at Registry._resolveEnvironmentSync (/Applications/JupyterLab.app/Contents/Resources/app.asar/build/out/main/registry.js:166:26)
    at new Registry (/Applications/JupyterLab.app/Contents/Resources/app.asar/build/out/main/registry.js:68:33)
    at new JupyterApplication (/Applications/JupyterLab.app/Contents/Resources/app.asar/build/out/main/app.js:176:26)
    at /Applications/JupyterLab.app/Contents/Resources/app.asar/build/out/main/main.js:202:22
~

@mbektas
Copy link
Member

mbektas commented Sep 12, 2023

@ewa are you still having this problem with the latest JupyterLab Desktop version? You can also checkout this guide on macOS permission issues.

@ewa
Copy link

ewa commented Sep 13, 2023

I abandoned it and have just been using the "regular" web interface version, but I'll revisit it and let you know.

@mbektas
Copy link
Member

mbektas commented Dec 17, 2023

closing this issue since it should be fixed with latest version. please create a new issue if needed.

@mbektas mbektas closed this as completed Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants