jupyterlab / jupyterlab-desktop

JupyterLab desktop application, based on Electron.
BSD 3-Clause "New" or "Revised" License
3.75k stars 363 forks source link

Invalid Environment for Project #755

Closed michaelpginn closed 9 months ago

michaelpginn commented 9 months ago

Description

When opening any new folder with JupyterLab, I get the error Invalid Environment for Project with no way to fix the issue.

Screenshot 2024-01-27 at 1 32 17 PM

Reproduce

  1. Launch JupyterLab application
  2. Click "Open" and select a folder

Expected behavior

The invalid environment appears to be the one bundled with the app, so I'm not sure why the error would be occurring. At the very least, there should be a way to switch environments in this case.

Context

Troubleshoot Output
$PATH:
        /Users/milesper/.pyenv/versions/3.10.0/bin
        /opt/homebrew/opt/pyenv/libexec
        /opt/homebrew/opt/pyenv/plugins/python-build/bin
        /Users/milesper/.meteor
        /Users/milesper/.pyenv/shims
        /Users/milesper/.nvm/versions/node/v18.18.0/bin
        /opt/homebrew/opt/ruby/bin
        /Users/milesper/Documents/google-cloud-sdk/bin
        /usr/local/sbin
        /Users/milesper/.pyenv/versions/3.7.2/bin
        /Users/milesper/Library/Python/3.7/bin
        /opt/homebrew/bin
        /opt/homebrew/sbin
        /usr/local/bin
        /System/Cryptexes/App/usr/bin
        /usr/bin
        /bin
        /usr/sbin
        /sbin
        /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
        /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
        /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
        /opt/X11/bin
        /Library/Apple/usr/bin
        /Library/TeX/texbin
        /usr/local/share/dotnet
        ~/.dotnet/tools
        /Library/Frameworks/Mono.framework/Versions/Current/Commands
        /Users/milesper/.ebcli-virtual-env/executables
        /Users/milesper/.pyenv/versions/3.10.0/bin
        /opt/homebrew/opt/pyenv/libexec
        /opt/homebrew/opt/pyenv/plugins/python-build/bin
        /Users/milesper/.meteor
        /Users/milesper/.nvm/versions/node/v18.18.0/bin
        /opt/homebrew/opt/ruby/bin
        /Users/milesper/Documents/google-cloud-sdk/bin
        /usr/local/sbin
        /Users/milesper/.pyenv/versions/3.7.2/bin
        /Users/milesper/Library/Python/3.7/bin
        /opt/homebrew/bin
        /opt/homebrew/sbin
        /Users/milesper/.cargo/bin
        /node_modules/.bin
        /Applications/JupyterLab.app/Contents/MacOS
        /usr/local/smlnj/bin
        /usr/local/smlnj/bin

sys.path:
        /Users/milesper/.pyenv/versions/3.10.0/bin
        /Users/milesper/.pyenv/versions/3.10.0/lib/python310.zip
        /Users/milesper/.pyenv/versions/3.10.0/lib/python3.10
        /Users/milesper/.pyenv/versions/3.10.0/lib/python3.10/lib-dynload
        /Users/milesper/.pyenv/versions/3.10.0/lib/python3.10/site-packages
        /Users/milesper/.pyenv/versions/3.10.0/lib/python3.10/site-packages/kenlm-0.2.0-py3.10-macosx-14.0-arm64.egg

sys.executable:
        /Users/milesper/.pyenv/versions/3.10.0/bin/python3.10

sys.version:
        3.10.0 (default, Sep 29 2023, 17:27:23) [Clang 15.0.0 (clang-1500.0.40.1)]

platform.platform():
        macOS-14.2.1-arm64-i386-64bit

which -a jupyter:
        /Users/milesper/.pyenv/versions/3.10.0/bin/jupyter
        /Users/milesper/.pyenv/shims/jupyter
        /Users/milesper/.pyenv/versions/3.10.0/bin/jupyter

pip list:
        Package                      Version
        ---------------------------- --------------------
        absl-py                      2.0.0
        accelerate                   0.25.0
        aiohttp                      3.9.1
        aiosignal                    1.3.1
        annotated-types              0.6.0
        anyio                        3.7.1
        appdirs                      1.4.4
        appnope                      0.1.3
        argon2-cffi                  23.1.0
        argon2-cffi-bindings         21.2.0
        arrow                        1.3.0
        asgiref                      3.7.2
        asttokens                    2.4.0
        astunparse                   1.6.3
        async-lru                    2.0.4
        async-timeout                4.0.3
        attrs                        23.1.0
        Babel                        2.13.0
        backcall                     0.2.0
        beautifulsoup4               4.12.2
        bleach                       6.1.0
        bs4                          0.0.1
        build                        1.0.3
        cachetools                   5.3.2
        certifi                      2023.7.22
        cffi                         1.16.0
        charset-normalizer           3.3.0
        cldfcatalog                  1.5.1
        cldfzenodo                   2.1.0
        click                        8.1.7
        clldutils                    3.20.0
        colorama                     0.4.6
        colorlog                     6.7.0
        comm                         0.1.4
        commonnexus                  1.9.2
        cryptography                 41.0.5
        csv-diff                     1.1
        csvw                         3.2.1
        dataplane                    0.1.3
        datasets                     2.15.0
        debugpy                      1.8.0
        decorator                    5.1.1
        defusedxml                   0.7.1
        dictdiffer                   0.9.0
        dill                         0.3.7
        distlib                      0.3.7
        distro                       1.8.0
        dj-database-url              2.1.0
        Django                       4.2.6
        djangorestframework          3.14.0
        dm-tree                      0.1.8
        docker-pycreds               0.4.0
        docopt                       0.6.2
        evaluate                     0.4.1
        exceptiongroup               1.1.3
        executing                    2.0.0
        fastjsonschema               2.18.1
        filelock                     3.12.4
        fire                         0.5.0
        flatbuffers                  23.5.26
        fqdn                         1.5.1
        frozenlist                   1.4.0
        fsspec                       2023.9.2
        gast                         0.5.4
        gensim                       4.3.2
        gitdb                        4.0.11
        GitPython                    3.1.40
        google-auth                  2.25.2
        google-auth-oauthlib         1.2.0
        google-pasta                 0.2.0
        graphviz                     0.20.1
        grpcio                       1.60.0
        gunicorn                     21.2.0
        h11                          0.14.0
        h5py                         3.10.0
        httpcore                     1.0.2
        httpx                        0.25.2
        huggingface-hub              0.19.4
        hypothesis                   6.88.1
        idna                         3.4
        inquirerpy                   0.3.4
        install                      1.3.5
        ipykernel                    6.25.2
        ipython                      8.16.1
        ipywidgets                   8.1.1
        iso639-lang                  2.2.2
        isodate                      0.6.1
        isoduration                  20.11.0
        jedi                         0.19.1
        Jinja2                       3.1.2
        jmespath                     1.0.1
        joblib                       1.3.2
        json5                        0.9.14
        jsonpointer                  2.4
        jsonschema                   4.19.1
        jsonschema-specifications    2023.7.1
        jupyter                      1.0.0
        jupyter_client               8.3.1
        jupyter-console              6.6.3
        jupyter_core                 5.4.0
        jupyter-events               0.7.0
        jupyter-lsp                  2.2.0
        jupyter_server               2.7.3
        jupyter_server_terminals     0.4.4
        jupyterlab                   4.0.6
        jupyterlab-pygments          0.2.2
        jupyterlab_server            2.25.0
        jupyterlab-widgets           3.0.9
        kagglehub                    0.1.5
        kenlm                        0.2.0
        keras                        3.0.2
        keras-core                   0.1.7
        keras-nightly                3.0.3.dev2023123003
        keras-nlp                    0.7.0
        langid                       1.1.6
        language-tags                1.2.0
        latexcodec                   2.0.1
        lexical-diversity            0.1.1
        libclang                     16.0.6
        linglit                      1.5.0
        lxml                         4.9.3
        Markdown                     3.5.1
        markdown-it-py               3.0.0
        MarkupSafe                   2.1.3
        matplotlib-inline            0.1.6
        mdurl                        0.1.2
        mistune                      3.0.2
        ml-dtypes                    0.3.1
        mpmath                       1.3.0
        multidict                    6.0.4
        multiprocess                 0.70.15
        nameparser                   1.1.3
        namex                        0.0.7
        nbclient                     0.8.0
        nbconvert                    7.9.2
        nbformat                     5.9.2
        nest-asyncio                 1.5.8
        networkx                     3.2.1
        newick                       1.9.0
        nltk                         3.8.1
        notebook                     7.0.6
        notebook_shim                0.2.3
        numpy                        1.26.2
        oauthlib                     3.2.2
        openai                       1.3.6
        opt-einsum                   3.3.0
        overrides                    7.4.0
        packaging                    23.2
        pandas                       2.1.3
        pandocfilters                1.5.0
        parso                        0.8.3
        pexpect                      4.8.0
        pfzy                         0.3.4
        pickleshare                  0.7.5
        Pillow                       10.0.1
        pip                          23.3.2
        pipenv                       2023.10.24
        pipreqs                      0.4.13
        platformdirs                 3.11.0
        plotly                       5.18.0
        portalocker                  2.8.2
        prometheus-client            0.17.1
        prompt-toolkit               3.0.32
        protobuf                     4.23.4
        psutil                       5.9.5
        psycopg2-binary              2.9.9
        ptyprocess                   0.7.0
        pure-eval                    0.2.2
        purl                         1.6
        pyarrow                      14.0.1
        pyarrow-hotfix               0.6
        pyasn1                       0.5.1
        pyasn1-modules               0.3.0
        pybtex                       0.24.0
        pycldf                       1.36.0
        pycountry                    22.3.5
        pycparser                    2.21
        pyctcdecode                  0.5.0
        pydantic                     2.5.2
        pydantic_core                2.14.5
        pyfoma                       1.0.4
        pyglottolog                  3.12.0
        Pygments                     2.17.2
        pygtrie                      2.5.0
        pyigt                        2.1.0
        pylatexenc                   2.10
        PyMySQL                      1.1.0
        pyparsing                    3.1.1
        pyproject_hooks              1.0.0
        python-dateutil              2.8.2
        python-frontmatter           1.0.1
        python-json-logger           2.0.7
        pytz                         2023.3.post1
        PyYAML                       6.0.1
        pyzmq                        25.1.1
        qtconsole                    5.5.1
        QtPy                         2.4.1
        rapidfuzz                    3.5.2
        rdflib                       7.0.0
        referencing                  0.30.2
        regex                        2023.10.3
        requests                     2.31.0
        requests-oauthlib            1.3.1
        responses                    0.18.0
        rfc3339-validator            0.1.4
        rfc3986                      1.5.0
        rfc3986-validator            0.1.1
        rich                         13.7.0
        rpds-py                      0.10.4
        rsa                          4.9
        sacrebleu                    2.3.3
        safetensors                  0.4.0
        scikit-learn                 1.3.1
        scipy                        1.11.3
        segments                     2.2.1
        semantic-code-search         0.4.0
        Send2Trash                   1.8.2
        sentence-transformers        2.2.2
        sentencepiece                0.1.99
        sentry-sdk                   1.38.0
        setproctitle                 1.3.3
        setuptools                   68.2.2
        six                          1.16.0
        smart-open                   6.4.0
        smmap                        5.0.1
        sniffio                      1.3.0
        sortedcontainers             2.4.0
        soundfile                    0.12.1
        soupsieve                    2.5
        SQLAlchemy                   1.4.50
        sqlparse                     0.4.4
        stack-data                   0.6.3
        svgling                      0.4.0
        svgwrite                     1.4.3
        sympy                        1.12
        tabulate                     0.9.0
        tb-nightly                   2.16.0a20231230
        tenacity                     8.2.3
        tensorboard                  2.15.1
        tensorboard-data-server      0.7.2
        tensorflow-estimator         2.15.0
        tensorflow-io-gcs-filesystem 0.34.0
        termcolor                    2.3.0
        terminado                    0.17.1
        TexSoup                      0.3.1
        tf-estimator-nightly         2.14.0.dev2023080308
        tf_keras-nightly             2.16.0.dev2023123010
        tf-nightly                   2.16.0.dev20231230
        tf-nightly-macos             2.16.0.dev20231230
        thefuzz                      0.20.0
        threadpoolctl                3.2.0
        tinycss2                     1.2.1
        tokenizers                   0.15.0
        tomli                        2.0.1
        torch                        2.1.2
        torchdata                    0.7.1
        torchtext                    0.16.2
        torchvision                  0.14.1
        tornado                      6.3.3
        tqdm                         4.66.1
        traitlets                    5.11.2
        transformers                 4.35.2
        tree-sitter                  0.20.1
        tree-sitter-builds           2022.8.27
        tree-sitter-languages        1.5.0
        types-python-dateutil        2.8.19.14
        typing_extensions            4.8.0
        tzdata                       2023.3
        Unidecode                    1.3.7
        uri-template                 1.3.0
        uritemplate                  4.1.1
        urllib3                      2.0.6
        virtualenv                   20.24.6
        wandb                        0.16.0
        wcwidth                      0.2.8
        webcolors                    1.13
        webencodings                 0.5.1
        websocket-client             1.6.4
        Werkzeug                     3.0.1
        wheel                        0.42.0
        Whoosh                       2.7.4
        widgetsnbextension           4.0.9
        wrapt                        1.14.1
        xxhash                       3.4.1
        yarg                         0.1.9
        yarl                         1.9.3
Browser Output (required for interface issues after loading)
Paste the output from the DevTools JavaScript console here, if applicable.

Logs (required for issues with loading, server and startup)

[2024-01-27 13:38:03.983] [info]  In production mode
[2024-01-27 13:38:03.992] [info]  Logging to file (/Users/milesper/Library/Logs/jupyterlab-desktop/main.log) at 'debug' level
[2024-01-27 13:38:04.003] [error] Python path "/Users/milesper/Library/jupyterlab-desktop/jlab_server/bin/python" does not exist.
[2024-01-27 13:38:04.017] [info]  feedURL https://update.electronjs.org/jupyterlab/jupyterlab-desktop/darwin-x64/4.0.11-1
[2024-01-27 13:38:04.018] [info]  requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (darwin: x64)' }
[2024-01-27 13:38:05.268] [info]  checking-for-update
[2024-01-27 13:38:06.019] [info]  update-not-available
[2024-01-27 13:38:07.533] [debug] Server launch script:

        source "/Users/milesper/.pyenv/bin/activate"
        python -m jupyterlab --no-browser --expose-app-in-browser --ServerApp.port=53832 --ServerApp.password="" --ServerApp.token="jlab:srvr:703f5bfb41db34f03f4e6f2aab68071eb65cc5" --LabApp.quit_button=False --JupyterApp.config_file_name="" --ContentsManager.allow_hidden=True
[2024-01-27 13:38:07.535] [debug] Server launch parameters:
  [script]: /var/folders/1y/v6m6qm2d3p52jn2sv6smp5cr0000gn/T/jlab_desktopJf6EJ6/launch.sh
  [options]: {"cwd":"/Users/milesper","shell":"/bin/bash","env":{"NVM_INC":"/Users/milesper/.nvm/versions/node/v18.18.0/include/node","MANPATH":"/Users/milesper/.nvm/versions/node/v18.18.0/share/man:/opt/homebrew/share/man::","TERM_PROGRAM":"Apple_Terminal","NVM_CD_FLAGS":"-q","TERM":"xterm-256color","SHELL":"/bin/zsh","HOMEBREW_REPOSITORY":"/opt/homebrew","TMPDIR":"/var/folders/1y/v6m6qm2d3p52jn2sv6smp5cr0000gn/T/","TERM_PROGRAM_VERSION":"452","TERM_SESSION_ID":"33CCEA7D-ACAB-4202-AA55-A6A76DF379DB","NVM_DIR":"/Users/milesper/.nvm","USER":"milesper","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.o8hFM0an4g/Listeners","PATH":"/Users/milesper/.meteor:/Users/milesper/.pyenv/shims:/Users/milesper/.nvm/versions/node/v18.18.0/bin:/opt/homebrew/opt/ruby/bin:/Users/milesper/Documents/google-cloud-sdk/bin:/usr/local/sbin:/Users/milesper/.pyenv/versions/3.7.2/bin:/Users/milesper/Library/Python/3.7/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/milesper/.ebcli-virtual-env/executables:/Users/milesper/Documents/School/STAT 5630 - Bayesian Modeling/node_modules/.bin:/Users/milesper/Documents/School/node_modules/.bin:/Users/milesper/Documents/node_modules/.bin:/Users/milesper/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Applications/JupyterLab.app/Contents/MacOS:/Users/milesper/.meteor:/Users/milesper/.nvm/versions/node/v18.18.0/bin:/opt/homebrew/opt/ruby/bin:/Users/milesper/Documents/google-cloud-sdk/bin:/usr/local/sbin:/Users/milesper/.pyenv/versions/3.7.2/bin:/Users/milesper/Library/Python/3.7/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/milesper/.cargo/bin:/usr/local/smlnj/bin:/usr/local/smlnj/bin","LaunchInstanceID":"F1966646-E611-4680-8313-E6F0AF531522","__CFBundleIdentifier":"com.apple.Terminal","PWD":"/Users/milesper/Documents/School/STAT 5630 - Bayesian Modeling","LANG":"en_US.UTF-8","XPC_FLAGS":"0x0","XPC_SERVICE_NAME":"0","PYENV_SHELL":"zsh","HOME":"/Users/milesper","SHLVL":"2","HOMEBREW_PREFIX":"/opt/homebrew","LOGNAME":"milesper","NVM_BIN":"/Users/milesper/.nvm/versions/node/v18.18.0/bin","INFOPATH":"/opt/homebrew/share/info:","HOMEBREW_CELLAR":"/opt/homebrew/Cellar","DISPLAY":"/private/tmp/com.apple.launchd.yZ3hS8W6WE/org.macosforge.xquartz:0","SECURITYSESSIONID":"186b3","_":"/Applications/JupyterLab.app/Contents/MacOS/JupyterLab","__CF_USER_TEXT_ENCODING":"0x1F5:0x0:0x0","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","JUPYTER_CONFIG_DIR":"/Users/milesper/Library/Application Support/jupyterlab-desktop","JUPYTERLAB_WORKSPACES_DIR":"/Users/milesper/.jupyter/desktop-workspaces"}}
[2024-01-27 13:38:10.060] [error] Python path "/Users/milesper/Library/jupyterlab-desktop/jlab_server/bin/python" does not exist.

mbektas commented 9 months ago

@michaelpginn could you try these in a Mac Terminal. do you see any errors when you launch JupyterLab this way?

cd into directory you tried to open in JupyterLab Desktop UI
jlab env activate
jupyter lab
mbektas commented 9 months ago

in the logs, I noticed that python executable was not found at /Users/milesper/Library/jupyterlab-desktop/jlab_server/bin/python. can you double check that?

you can reinstall the bundled environment using jlab env install --force in a Mac terminal. Note that this will first delete the existing installation.

michaelpginn commented 9 months ago

Thanks, that worked! Looks like my jlab_server folder was missing, somehow.