{"id":771,"library":"jupyter-lsp","title":"Jupyter Language Server Protocol Server Extension","description":"jupyter-lsp acts as a multi-language server WebSocket proxy for Jupyter Notebook and JupyterLab servers. It enables advanced IDE-like features such as code navigation, hover suggestions, linters, and autocompletion in Jupyter environments by leveraging the Language Server Protocol (LSP). It works in conjunction with a frontend extension, typically `jupyterlab-lsp`, and specific language servers (e.g., `python-lsp-server`). The library is actively maintained, with version 2.3.0 being the current stable release, supporting Python >=3.8.","status":"active","version":"2.3.0","language":"python","source_language":"en","source_url":"https://github.com/jupyter-lsp/jupyter-lsp","tags":["jupyter","jupyterlab","lsp","language server protocol","ide features","code assistance","server extension"],"install":[{"cmd":"pip install jupyter-lsp jupyterlab-lsp 'jupyterlab>=4.1.0' python-lsp-server","lang":"bash","label":"For JupyterLab (includes frontend and a Python language server)"},{"cmd":"conda install -c conda-forge jupyter-lsp jupyterlab-lsp 'jupyterlab>=4.1.0' python-lsp-server","lang":"bash","label":"For JupyterLab with Conda"}],"dependencies":[{"reason":"Provides the frontend (JupyterLab) integration for LSP features.","package":"jupyterlab-lsp","optional":false},{"reason":"The primary Jupyter frontend environment where jupyter-lsp is typically used. Requires >=4.1.0 for recent jupyterlab-lsp versions.","package":"jupyterlab","optional":false},{"reason":"An example of a specific language server needed for Python LSP features. Users must install appropriate language servers for their desired languages (e.g., 'bash-language-server', 'vscode-html-languageserver-bin').","package":"python-lsp-server","optional":true}],"imports":[{"note":"Its functionality is enabled by installing it as a Jupyter server extension. Configuration is done via Jupyter config files (JSON or Python) rather than direct Python imports for end-users.","symbol":"jupyter_lsp","correct":"jupyter-lsp is primarily a server extension and not typically imported directly in user-facing Python code within a notebook or script for its core functionality."}],"quickstart":{"code":"# Install jupyter-lsp and the JupyterLab frontend extension\npip install jupyter-lsp jupyterlab-lsp 'jupyterlab>=4.1.0'\n\n# Install a language server for Python (e.g., python-lsp-server)\npip install python-lsp-server\n\n# If using other languages, install their respective LSP servers, e.g., for R:\n# Rscript -e 'install.packages(\"languageserver\")'\n\n# After installation, restart your JupyterLab instance to enable the extensions.\n# You can then verify the installation and configure language servers via:\n# JupyterLab Settings -> Settings Editor -> Language Servers (Experimental)\n\n# Example of how you might enable the server extension if not auto-detected (less common now):\n# jupyter server extension enable jupyter_lsp --py --sys-prefix\n\n# To verify server extensions are enabled (run in terminal):\n# jupyter server extension list","lang":"bash","description":"This quickstart guides you through installing `jupyter-lsp`, its JupyterLab frontend counterpart `jupyterlab-lsp`, and a common Python language server. After installation, a restart of JupyterLab is crucial for the extensions to be recognized. Language server configurations can then be managed through JupyterLab's settings."},"warnings":[{"fix":"Ensure `jupyterlab-lsp` is installed for JupyterLab, and install the specific language server(s) for the languages you intend to use.","message":"Installing `jupyter-lsp` alone is not enough; you must also install a separate frontend extension (like `jupyterlab-lsp` for JupyterLab) AND at least one language server (e.g., `python-lsp-server` for Python) to get any LSP features. `jupyter-lsp` is only the backend proxy.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Close and reopen your JupyterLab or Jupyter Notebook session after installation.","message":"JupyterLab (and sometimes Jupyter Notebook) must be restarted after installing `jupyter-lsp` and `jupyterlab-lsp` for the extensions and language servers to be properly recognized and activated.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Temporarily run `%config Completer.use_jedi = False` in a notebook cell, or add `c.Completer.use_jedi = False` to your `ipython_config.py` for a permanent solution.","message":"For Python, disabling Jedi (e.g., `%config Completer.use_jedi = False` in IPython or in `ipython_config.py`) can prevent conflicts and improve autocompletion performance when using LSP servers like `python-lsp-server` (which often use Jedi internally).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your Jupyter environment is compatible. For `jupyter-lsp` 2.x, use Jupyter Server or a recent JupyterLab installation (which typically bundles Jupyter Server).","message":"`jupyter-lsp` versions 0.x were designed for Jupyter Notebook Server, while versions 1.x and above are for Jupyter Server. Installing `jupyter-lsp` 2.x with an older Jupyter Notebook environment might lead to unexpected behavior or failure to load.","severity":"breaking","affected_versions":"Pre-1.0 to 1.x and 2.x"},{"fix":"Consult the `jupyter-lsp` documentation for the correct configuration key names for your installed version. Update your `jupyter_server_config.json` or Python configuration files accordingly.","message":"Configuration keys for language servers have changed over time. For example, `language_servers` became `languageServers` and `pyls.serverSettings` became `pylsp.configuration`. Using old configuration keys can prevent language servers from loading or behaving as expected.","severity":"breaking","affected_versions":"Older versions transitioning to newer ones (exact transition points vary per key)"},{"fix":"Create a symlink (`.lsp_symlink`) in your Jupyter root pointing to `/` (or `C:\\` on Windows), or modify `jupyter_server_config.py` as per documentation to extend file access.","message":"By default, Jupyter Server might restrict access to files outside its root directory. For LSP features like 'Jump to Definition' to work with system-wide installed packages or virtual environments, you might need to create a symlink to your system root (e.g., `.lsp_symlink` in your Jupyter root) or configure `jupyter_server_config.py` to allow broader file access.","severity":"gotcha","affected_versions":"All versions on Linux/OSX, potentially others depending on server configuration"},{"fix":"Execute `pip install jupyter-lsp jupyterlab-lsp 'jupyterlab>=4.1.0'` directly in your shell/terminal, or if running from a Python script, use `import subprocess; subprocess.run(['pip', 'install', 'jupyter-lsp', 'jupyterlab-lsp', 'jupyterlab>=4.1.0'])`.","message":"Attempting to run shell commands like `pip install` directly within a Python script (e.g., `/script.py`) will result in a `SyntaxError`. Shell commands must be executed using appropriate methods such as `subprocess.run()` or by running the script from a shell.","severity":"breaking","affected_versions":"All Python versions"},{"fix":"Ensure `pip install` commands are executed in a shell environment (e.g., via a `.sh` script or directly in the terminal). If running from a Python script, use `subprocess.run(['pip', 'install', 'package_name'])` or similar methods to invoke shell commands.","message":"`pip install` is a shell command and cannot be directly executed as Python syntax within a `.py` file. Attempting to do so will result in a `SyntaxError`.","severity":"breaking","affected_versions":"All Python versions (this is a fundamental language syntax rule)"}],"env_vars":null,"search_vec":"'2.3.0':79 '3.8':87 'act':10 'activ':75 'advanc':27 'assist':97 'autocomplet':40 'code':34,96 'conjunct':54 'current':82 'e.g':67 'enabl':26 'environ':43 'extens':6,58,99 'featur':31,95 'frontend':57 'hover':36 'ide':29,94 'ide-lik':28 'jupyt':1,8,20,42,88 'jupyter-lsp':7 'jupyterlab':23,61,89 'jupyterlab-lsp':60 'languag':2,15,47,65,91 'leverag':45 'librari':73 'like':30 'linter':38 'lsp':9,50,62,70,90 'maintain':76 'multi':14 'multi-languag':13 'navig':35 'notebook':21 'protocol':4,49,93 'proxi':18 'python':69,86 'python-lsp-serv':68 'releas':84 'server':3,5,16,24,48,66,71,92,98 'specif':64 'stabl':83 'suggest':37 'support':85 'typic':59 'version':78 'websocket':17 'work':52","created_at":"2026-03-29T04:20:58.992696+00:00","updated_at":"2026-04-16T15:59:06.121697+00:00","problems":{"verify_error":"no import statement found"},"ecosystem":"pypi","meta_description":null,"install_score":0,"quickstart_score":0,"quickstart_tag":"stale","pypi_latest":"2.3.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/jupyter-lsp/jupyterlab-lsp","docs":"https://jupyterlab-lsp.readthedocs.io/","changelog":null,"pypi":"https://pypi.org/project/jupyter-lsp/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","web-framework","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"skip","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-06","install_tag":"stale"}}