{"id":6435,"library":"pyston-autoload","title":"Pyston Autoload","description":"Pyston-Autoload automatically detects and enables the Pyston JIT compiler when imported, aiming to provide performance improvements for Python applications. It acts as a bootstrap mechanism for the Pyston runtime. The current version is 2.3.5, and it generally follows the release cadence of the underlying Pyston project.","status":"active","version":"2.3.5","language":"en","source_language":"en","source_url":"https://www.github.com/pyston/pyston","tags":["performance","jit","python-runtime","optimization","pyston"],"install":[{"cmd":"pip install pyston-autoload","lang":"bash","label":"Install for full Pyston"},{"cmd":"pip install pyston_lite_autoload","lang":"bash","label":"Install for Pyston-Lite (extension module)"}],"dependencies":[],"imports":[{"symbol":"pyston_autoload","correct":"import pyston_autoload"}],"quickstart":{"code":"import pyston_autoload\nimport sys\n\nprint(f\"Pyston Autoload imported. This enables the Pyston JIT if the Pyston runtime is detected.\")\nprint(f\"Current Python version: {sys.version}\")\n\n# Run some typical Python code. If Pyston is active, it may run faster.\ndef fib(n):\n    if n <= 1:\n        return n\n    else:\n        return fib(n-1) + fib(n-2)\n\nprint(f\"Calculating fib(10): {fib(10)}\")","lang":"python","description":"This quickstart demonstrates the core usage of `pyston-autoload`: a simple import at the beginning of your script. This import will automatically enable the Pyston JIT if a compatible Pyston runtime is found in the environment. If Pyston is not detected, the import will succeed, but the JIT will not be active."},"warnings":[{"fix":"Ensure Pyston (or Pyston-Lite) is correctly installed for your system architecture and distribution *before* installing and importing `pyston-autoload`.","message":"Pyston-Autoload only *enables* an existing Pyston runtime; it does not install Pyston itself. Pyston often requires platform-specific installation methods (e.g., .deb packages, portable archives, or conda environments) which need to be set up independently.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Choose the correct autoload package based on your Pyston installation strategy: `pyston-autoload` for full Pyston, `pyston_lite_autoload` if you're installing `pyston_lite` via `pip install pyston_lite_autoload`.","message":"A distinction exists between `pyston-autoload` and `pyston_lite_autoload`. `pyston-autoload` is for the full Pyston distribution, while `pyston_lite_autoload` (introduced in v2.3.4) is for `pyston_lite`, which is distributed as a Python extension module via PyPI.","severity":"gotcha","affected_versions":">=2.3.4"},{"fix":"Place `import pyston_autoload` at the top of your primary Python script or module that runs your application.","message":"To ensure Pyston's JIT is active for the entire application, `import pyston_autoload` should be one of the very first statements in your main application script.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade your operating system to Ubuntu 18.04 or newer, or use a portable Pyston release based on a supported OS version.","message":"Support for Ubuntu 16.04 was removed due to dependencies removing support. This means portable releases are now based on Ubuntu 18.04.","severity":"breaking","affected_versions":">=2.3.2"},{"fix":"When installing the Pyston runtime, download the package corresponding to your CPU architecture (e.g., `amd64` or `arm64`). This is particularly important for the full Pyston distribution.","message":"Pyston is distributed with architecture-specific packages (e.g., `amd64` for Intel/AMD x86_64, `arm64` for aarch64 ARM CPUs). Ensure the underlying Pyston runtime matches your system's architecture.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}