{"id":440,"library":"jedi","title":"Jedi: Autocompletion and Static Analysis for Python","description":"Jedi is a static analysis tool for Python, primarily used for autocompletion and goto functionality in IDEs and editor plugins. It also offers features like refactoring, code search, and finding references. The current version is 0.19.2, released on November 10, 2024. Jedi follows a regular release cadence, with updates approximately every 6-12 months.","status":"active","version":"0.19.2","language":"python","source_language":"en","source_url":"https://github.com/davidhalter/jedi","tags":["autocompletion","static analysis","refactoring","Python"],"install":[{"cmd":"pip install jedi","lang":"bash","label":"Install Jedi"}],"dependencies":[{"reason":"Required for running the test suite","package":"pytest","optional":true}],"imports":[{"note":"Ensure correct import path to avoid ImportError","symbol":"Script","correct":"from jedi import Script"}],"quickstart":{"code":"import jedi\n\nsource = '''\nimport json\njson.lo\n'''\nscript = jedi.Script(source, path='example.py')\ncompletions = script.complete(3, len('json.lo'))\nprint(completions[0].name)","lang":"python","description":"A simple example demonstrating Jedi's autocompletion feature."},"warnings":[{"fix":"Upgrade to Python 3.6 or later.","message":"Deprecation of Python 2 support in version 0.16.0","severity":"breaking","affected_versions":"0.16.0"},{"fix":"Use the 'complete' method instead.","message":"Use of deprecated 'completions' method in version 0.16.0","severity":"gotcha"},{"fix":"Review the full test logs for detailed error messages or stack traces leading to the 'load' event to identify the root cause.","message":"Unspecified failure during library load process.","severity":"breaking","affected_versions":"unknown"}],"env_vars":null,"last_verified":"2026-05-12T13:50:00.794Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"Ensure 'jedi' is installed in your active Python environment: `pip install jedi` or `python -m pip install jedi`.","cause":"The 'jedi' package is not installed in the Python environment being used, or the Python environment where it is installed is not correctly configured in the IDE/editor.","error":"ModuleNotFoundError: No module named 'jedi'"},{"fix":"Upgrade 'jedi' to the latest version: `pip install --upgrade jedi`. If the issue persists, ensure no conflicting 'jedi' installations exist and try reinstalling it: `pip uninstall jedi && pip install jedi`.","cause":"This typically occurs when an outdated or incompatible version of 'jedi' is installed, or when there's a conflict in the Python environment leading to the wrong 'jedi' module being loaded. The `Script` class might have moved or been removed in a newer major version, or the installed `jedi` is too old for the code trying to use `Script`.","error":"AttributeError: module 'jedi' has no attribute 'Script'"},{"fix":"Reinstall 'jedi' to ensure all its components are consistent: `pip uninstall jedi && pip install jedi`. If using a specific editor plugin (like jedi-vim), ensure it's compatible with your installed Python and jedi versions.","cause":"This error points to an internal inconsistency or version mismatch within the 'jedi' library or its dependencies, often due to a partial or corrupted installation, or an incompatibility with the Python version being used.","error":"ImportError: cannot import name 'traverse_parents'"},{"fix":"Update `jedi` and any related language server components to their latest versions: `pip install --upgrade jedi jedi-language-server`. Consider ensuring your Python environment is up-to-date, especially if you are using an older Python 3.x version.","cause":"This error often arises from a compatibility issue between the 'jedi' library (or its components like 'jedi-language-server') and the `typing` module, particularly with older Python versions or specific setups where `typing` might be backported or have an unexpected structure.","error":"AttributeError: module 'typing' has no attribute '_SpecialForm'"}],"ecosystem":"pypi","meta_description":null,"install_score":100,"install_tag":"verified","quickstart_score":80,"quickstart_tag":"verified","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.33,"mem_mb":13.4,"disk_size":"29.6M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.21,"mem_mb":13.4,"disk_size":"30M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.47,"mem_mb":14.8,"disk_size":"32.0M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.35,"mem_mb":14.8,"disk_size":"33M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.35,"mem_mb":14.9,"disk_size":"23.8M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.34,"mem_mb":14.9,"disk_size":"24M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.38,"mem_mb":14.7,"disk_size":"23.4M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.34,"mem_mb":14.7,"disk_size":"24M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.34,"mem_mb":13.2,"disk_size":"29.1M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.34,"mem_mb":13.2,"disk_size":"30M"}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"verified","tag_description":"quickstart runs on critical runtimes, recently tested","results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}}