jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
14.15k stars 3.38k forks source link

Doesn't support 3.13t #16873

Closed eyalk11 closed 11 hours ago

eyalk11 commented 1 week ago

Description

Jupyer doesn't seem to be able to install with 13.3t pip , and when using python 3.13 to install jupyter , it shows the ui, but doesnt work internally.

Would like to take advantage of the really nice perf improvment in this recent version .

Reproduce

python3.13 -m pip install jupyter while using python3.13t , jupyter lab .

But of course also python3.13t -m pip install jupyter doesn't work

[E 2024-10-16 13:40:17.011 ServerApp] Uncaught exception GET /api/kernels/256efd16-c3d7-46f7-96d3-5f4c4d97ba64/channels?session_id=8dbeb8d5-67ee-4e3a-a086-172f54673acc (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8889', method='GET', uri='/api/kernels/256efd16-c3d7-46f7-96d3-5f4c4d97ba64/channels?session_id=8dbeb8d5-67ee-4e3a-a086-172f54673acc', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages\tornado\web.py", line 1790, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages\jupyter_server\services\kernels\websocket.py", line 66, in get
        await super().get(kernel_id=kernel_id)
      File "C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages\tornado\websocket.py", line 273, in get
        await self.ws_connection.accept_connection(self)
      File "C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages\tornado\websocket.py", line 863, in accept_connection
        await self._accept_connection(handler)
      File "C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages\tornado\websocket.py", line 903, in _accept_connection
        self.selected_subprotocol = handler.select_subprotocol(subprotocols)
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
      File "C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages\jupyter_server\services\kernels\websocket.py", line 88, in select_subprotocol
        preferred_protocol = self.connection.kernel_ws_protocol
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'kernel_ws_protocol'

Context

Troubleshoot Output
```
$PATH:
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Scripts
        C:\Program Files\PowerShell\7
        C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin
        C:\Program Files\ImageMagick-7.1.1-Q16-HDRI
        C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin
        C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\libnvvp
        C:\Program Files\Common Files\Oracle\Java\javapath
        C:\Perl64\bin
        C:\Program Files (x86)\Common Files\Oracle\Java\javapath
        C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.9.1942.0_x64__8wekyb3d8bbwe
        C:\Windows\System32
        C:\Windows
        C:\Windows\System32\wbem
        C:\Windows\System32\WindowsPowerShell\v1.0\
        C:\Windows\System32\OpenSSH\
        C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
        C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
        C:\Program Files\dotnet\
        C:\Program Files\Git\cmd
        C:\Program Files (x86)\Yarn\bin\
        C:\Users\ekarni\AppData\Roaming\ActiveState\bin
        C:\Users\ekarni\AppData\Local\activestate\bin
        C:\Users\ekarni\.pyenv\pyenv-win\bin
        C:\Users\ekarni\.pyenv\pyenv-win\bin
        C:\Ruby30-x64\bin
        C:\Users\ekarni\AppData\Local\Microsoft\WindowsApps
        C:\Users\ekarni\AppData\Roaming\npm
        C:\Users\ekarni\AppData\Local\Yarn\bin
        c:\nvim-win64\Neovim\bin
        C:\ProgramData\chocolatey\bin
        C:\Program Files\010 Editor
        C:\Program Files\Amazon\AWSCLIV2\
        C:\Users\ekarni\AppData\Local\Programs\Python\Python310\Scirpts
        C:\Users\ekarni\AppData\Local\Programs\Python\Python310
        C:\Program Files\ojdkbuild\java-14-openjdk-14.0.1-1\bin
        C:\Program Files\Wolfram Research\WolframScript\
        C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\
        C:\Program Files\LLVM\bin
        C:\Program Files (x86)\dotnet\
        C:\Users\ekarni\Downloads\ctags-p5.9.20221204.0-x64
        C:\Program Files\NVIDIA Corporation\Nsight Compute 2023.2.0\
        C:\gitproj\chess_analyzer\C:\Users\ekarni\AppData\Roaming\nvm
        C:\gitproj\chess_analyzer\C:\Program Files\nodejs
        C:\Program Files\PowerShell\7\
        C:\Program Files\Docker\Docker\resources\bin
        C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin
        C:\Users\ekarni\.elan\bin
        C:\Users\ekarni\scoop\shims
        C:\Users\ekarni\.cargo\bin
        C:\gitproj\emsdk
        C:\gitproj\emsdk\upstream\emscripten
        C:\Users\ekarni\mambaforge
        C:\Users\ekarni\mambaforge\Library\mingw-w64\bin
        C:\Users\ekarni\mambaforge\Library\usr\bin
        C:\Users\ekarni\mambaforge\Library\bin
        C:\Users\ekarni\mambaforge\Scripts
        C:\Users\ekarni\.pyenv\pyenv-win\bin
        C:\Users\ekarni\AppData\Local\Programs\Python\Python310\Scripts
        C:\Users\ekarni\AppData\Local\Programs\Python\Python310
        C:\Users\ekarni\AppData\Roaming\ActiveState\bin
        C:\Users\ekarni\AppData\Local\activestate\bin
        C:\Ruby30-x64\bin
        C:\Users\ekarni\AppData\Local\Microsoft\WindowsApps
        C:\Users\ekarni\AppData\Roaming\npm
        C:\Users\ekarni\AppData\Local\Yarn\bin
        C:\texlive\2021\bin\win32
        C:\Users\ekarni\AppData\Local\Programs\Microsoft VS Code\bin
        C:\Program Files\JetBrains\PyCharm 213.4631.9\bin
        C:\Users\ekarni\.dotnet\tools
        C:\Users\ekarni\AppData\Local\Programs\Fiddler
        C:\Users\ekarni\.dotnet\tools
        C:\Users\ekarni\Downloads\ctags-p5.9.20221204.0-x64
        C:\SysinternalsSuite
        C:\Users\ekarni\AppData\Local\Pandoc\
        C:\Users\ekarni\AppData\Roaming\nvm
        C:\Program Files\nodejs
        C:\Users\ekarni\chrome-win64
        C:\Users\ekarni\AppData\Local\Microsoft\WinGet\Links

sys.path:
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Scripts\jupyter-troubleshoot.EXE
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\python313.zip
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\DLLs
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages\win32
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages\win32\lib
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Lib\site-packages\Pythonwin

sys.executable:
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\python.exe

sys.version:
        3.13.0 (tags/v3.13.0:60403a5, Oct  7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)]

platform.platform():
        Windows-10-10.0.19045-SP0

where jupyter:
        C:\Users\ekarni\.pyenv\pyenv-win\versions\3.13\Scripts\jupyter.exe
        C:\Users\ekarni\AppData\Local\Programs\Python\Python310\Scripts\jupyter.exe

pip list:
        Package                   Version        Editable project location
        ------------------------- -------------- --------------------------
        aiostream                 0.6.2
        anyio                     4.6.2.post1
        argon2-cffi               23.1.0
        argon2-cffi-bindings      21.2.0
        arrow                     1.3.0
        asttokens                 2.4.1
        async-lru                 2.0.4
        attrs                     24.2.0
        babel                     2.16.0
        beautifulsoup4            4.12.3
        bleach                    6.1.0
        build                     1.2.2.post1
        certifi                   2024.8.30
        cffi                      1.17.1
        charset-normalizer        3.4.0
        chess                     1.11.0
        click                     8.1.7
        colorama                  0.4.6
        comm                      0.2.2
        Cython                    3.0.11
        debugpy                   1.8.7
        decorator                 5.1.1
        defusedxml                0.7.1
        executing                 2.1.0
        fastjsonschema            2.20.0
        fqdn                      1.5.1
        h11                       0.14.0
        httpcore                  1.0.6
        httpx                     0.27.2
        idna                      3.10
        ipdb                      0.13.13
        ipykernel                 6.29.5
        ipython                   8.28.0
        ipywidgets                8.1.5
        isoduration               20.11.0
        jedi                      0.19.1
        Jinja2                    3.1.4
        json5                     0.9.25
        jsonpointer               3.0.0
        jsonschema                4.23.0
        jsonschema-specifications 2024.10.1
        jupyter                   1.1.1
        jupyter_client            8.6.3
        jupyter-console           6.6.3
        jupyter_core              5.7.2
        jupyter-events            0.10.0
        jupyter-lsp               2.2.5
        jupyter_server            2.14.2
        jupyter_server_terminals  0.5.3
        jupyterlab                4.2.5
        jupyterlab_pygments       0.3.0
        jupyterlab_server         2.27.3
        jupyterlab_widgets        3.0.13
        MarkupSafe                3.0.1
        matplotlib-inline         0.1.7
        memoization               0.4.0
        meson                     1.5.2
        meson-python              0.16.0
        mistune                   3.0.2
        nbclient                  0.10.0
        nbconvert                 7.16.4
        nbformat                  5.10.4
        nest-asyncio              1.6.0
        ninja                     1.11.1.1
        notebook                  7.2.2
        notebook_shim             0.2.4
        numpy                     2.2.0.dev0
        overrides                 7.7.0
        packaging                 24.1
        pandocfilters             1.5.1
        parso                     0.8.4
        pip                       24.2
        platformdirs              4.3.6
        prometheus_client         0.21.0
        prompt_toolkit            3.0.48
        psutil                    6.0.0
        pure_eval                 0.2.3
        pycparser                 2.22
        Pygments                  2.18.0
        pyproject_hooks           1.2.0
        pyproject-metadata        0.8.1
        Pyro5                     5.15
        python-dateutil           2.9.0.post0
        python-json-logger        2.0.7
        pywin32                   308
        pywinpty                  2.0.13
        PyYAML                    6.0.2
        pyzmq                     26.2.0
        referencing               0.35.1
        requests                  2.32.3
        rfc3339-validator         0.1.4
        rfc3986-validator         0.1.1
        rpds-py                   0.20.0
        Send2Trash                1.8.3
        serpent                   1.41
        setuptools                75.1.0
        six                       1.16.0
        sniffio                   1.3.1
        soupsieve                 2.6
        spin                      0.8
        stack-data                0.6.3
        sunfish                   1.0.0
        terminado                 0.18.1
        timer-decorator           0.1.3          C:\gitproj\execution-timer
        tinycss2                  1.3.0
        tornado                   6.4.1
        traitlets                 5.14.3
        types-python-dateutil     2.9.0.20241003
        typing_extensions         4.12.2
        uri-template              1.3.0
        urllib3                   2.2.3
        wcwidth                   0.2.13
        webcolors                 24.8.0
        webencodings              0.5.1
        websocket-client          1.8.0
        widgetsnbextension        4.0.13
```
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.

JasonWeill commented 1 day ago

Need to verify whether this applies to all flavors of Python 3.13, or just the free-threaded mode (3.13t).

JasonWeill commented 1 day ago

Per @krassowski 's PR #16852, tests are failing on Python 3.13.

JasonWeill commented 1 day ago

@frenzymadness found a problem when running Jupyter Server with a Python 3.13 beta earlier this year: https://github.com/jupyter-server/jupyter_server/issues/1387#issuecomment-2206276882 .

The error mentioned above is in server code.

JasonWeill commented 1 day ago

Might also be related to https://github.com/jupyter-server/jupyter_server/issues/1265, which was opened last year. This issue predates Python 3.13, and is still open.

JasonWeill commented 1 day ago

@eyalk11 What do you mean by "doesnt work internally"? What are you trying to do, and what do you see?

eyalk11 commented 20 hours ago

I tried to cheat installing it with python 3.13 and using 3.13t. You can ignore. I guess ir doesn't install in 3.13t.

JasonWeill commented 11 hours ago

I was able to install and run JupyterLab 4.2.5 successfully, via conda, using Python 3.13 on Windows 10. Closing in favor of https://github.com/jupyter-server/jupyter_server/issues/1265, which covers this issue.