question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to find a compatible python environment at the configured path (3.3.2-2+)

See original GitHub issue

Description

With the latest release (v3.3.2-2) of Jupyterlab Desktop, I can’t use python env created by conda. It prompted with the following message. With v3.3.2-1, I didn’t have any issue.

failed to find a compatible python environment at the configured path “/users/p.xing/library/jupyterlab-desktop/jlab_server/bin/python”. environment python package requirements are: jupyterlab >=3.1.0.

Reproduce

  • Install the latest v3.3.2-2
  • activate python env with conda activate jupyterlab
  • get python dir which python
  • Use the prompted path /Users/myUserName/miniconda3/envs/jupyterlab/bin/python as the Jupyter lab desktop custom env path
  • failed to boot

Expected behavior

(pre) Solution

Using the v3.3.2-1 pkg installer, boot up with no issue.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:37 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
mmangionecommented, Aug 30, 2022

Can also confirm that this is similarly broken on M1 Pro. It is impossible to switch environments from conda to pip. The system never recognizes my virtualenv with jupyterlab installed. It works just fine on my Intel Mac Mini.

I cannot use Jupyter Desktop at all since Conda is a nonviable environment for us.

Jupyter installed via homebrew, using the instructions above, works.

1reaction
JackieMiumcommented, Aug 4, 2022

Hi. I upgraded from jupyterlab-app (3.1.12-1) to jupyterlab-desktop (3.3.4-2) on my Debian Linux laptop and got this error too.

Set Python Environment
Failed to find a compatible Python environment at the configured path "/home/adam/.config/jupyterlab-desktop/jlab_server/bin/python". Environment Python package requirements are: jupyterlab >=3.1.0.

I ran mv ~/.config/jupyterlab_app{,.bak} after removing jupyterlab-app (3.1.12-1). I am trying to use a conda env Python3 too. conda is alreay in my PATH, which can be confirmed by running conda activate sklearn-env to get a working python 3.9.13 env.

I tried launching in a terminal with /opt/JupyterLab/jupyterlab-desktop command after I activated the conda Python3 env but the same error persisted. This is ~/.config/jupyterlab-desktop/logs/main.log :

[2022-08-04 18:17:42.927] [info]  In production mode
[2022-08-04 18:17:42.931] [info]  Logging to file (/home/adam/.config/jupyterlab-desktop/logs/main.log) at 'false' level
[2022-08-04 18:17:42.994] [error] (node:790120) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `jupyterlab-desktop --trace-deprecation ...` to show where the warning was created)
[2022-08-04 18:19:48.776] [error] Failed to check for updates: FetchError: request to https://github.com/jupyterlab/jupyterlab-desktop/releases/latest/download/latest.yml failed, reason: socket hang up
    at ClientRequest.<anonymous> (/opt/JupyterLab/resources/app.asar/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:394:28)
    at TLSSocket.socketOnEnd (node:_http_client:471:9)
    at TLSSocket.emit (node:events:406:35)
    at endReadableNT (node:internal/streams/readable:1331:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
[2022-08-04 18:32:37.702] [info]  In production mode
[2022-08-04 18:32:37.704] [info]  Logging to file (/home/adam/.config/jupyterlab-desktop/logs/main.log) at 'false' level
[2022-08-04 18:32:37.756] [error] (node:791112) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `jupyterlab-desktop --trace-deprecation ...` to show where the warning was created)
[2022-08-04 18:32:38.927] [error] (node:791112) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/home/adam/Programs/miniconda3/envs/sklearn-env/envs'
[2022-08-04 18:32:38.927] [error] (node:791112) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which
 was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[2022-08-04 18:34:43.656] [error] Failed to check for updates: FetchError: request to https://github.com/jupyterlab/jupyterlab-desktop/releases/download/v3.3.4-2/latest.yml failed, reason: socket hang up
    at ClientRequest.<anonymous> (/opt/JupyterLab/resources/app.asar/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:394:28)
    at TLSSocket.socketOnEnd (node:_http_client:471:9)
    at TLSSocket.emit (node:events:406:35)
    at endReadableNT (node:internal/streams/readable:1331:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
[2022-08-04 18:36:49.413] [info]  In production mode
[2022-08-04 18:36:49.416] [info]  Logging to file (/home/adam/.config/jupyterlab-desktop/logs/main.log) at 'false' level
[2022-08-04 18:36:49.472] [error] (node:791429) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `jupyterlab-desktop --trace-deprecation ...` to show where the warning was created)
[2022-08-04 18:38:55.664] [error] Failed to check for updates: FetchError: request to https://github.com/jupyterlab/jupyterlab-desktop/releases/download/v3.3.4-2/latest.yml failed, reason: socket hang up
    at ClientRequest.<anonymous> (/opt/JupyterLab/resources/app.asar/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:394:28)
    at TLSSocket.socketOnEnd (node:_http_client:471:9)
    at TLSSocket.emit (node:events:406:35)
    at endReadableNT (node:internal/streams/readable:1331:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

See the line

[2022-08-04 18:32:38.927] [error] (node:791112) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/home/adam/Programs/miniconda3/envs/sklearn-env/envs'

It’s definitely looking for the wrong thing, where I was told to choose a the path to python (in my case /home/adam/Programs/miniconda3/envs/sklearn-env/bin/python3), but it’s somehow looking for a env? I may have to set /home/adam/Programs/miniconda3/envs/ at Use a custom Python environment but it won’t let me choose a path to a dir. Help this helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to find a compatible Python environment at the ...
I select Use a custom Python environment, click Select Python path and choose the path to the Python 3.10 (e.g. ~\AppData\Local\Programs\Python\ ...
Read more >
Jupyter Desktop Set Python Environment Error Message
Jupyter Desktop Set Python Environment Error Message ... I'm going to try to fix it my way, and get a Python 3.10 kernel...
Read more >
JupyterLab Windows desktop version cannot run error ...
JupyterLab desktop Windows version cannot run. When I open the software and it raises an error: jupyterlab_app Environment not found ...
Read more >
PEP 405 – Python Virtual Environments
This PEP proposes to add to Python a mechanism for lightweight “virtual environments” with their own site directories, optionally isolated from system site ......
Read more >
pipenv Documentation - Read the Docs
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the. Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found