{"id":552,"library":"pbs-installer","title":"PBS Installer","description":"pbs-installer is a Python library that serves as an installer for @indygreg's python-build-standalone. It automates the process of downloading and installing specific Python versions in a standalone fashion. The library is actively maintained with frequent releases, often multiple times a month, and is currently at version 2026.3.25.","status":"active","version":"2026.3.25","language":"python","source_language":"en","source_url":"https://github.com/frostming/pbs-installer","tags":["installer","build","standalone","python-versions","packaging"],"install":[{"cmd":"pip install pbs-installer","lang":"bash","label":"Basic Installation"},{"cmd":"pip install pbs-installer[all]","lang":"bash","label":"Installation with all optional dependencies (recommended)"},{"cmd":"pipx install pbs-installer","lang":"bash","label":"CLI Installation (recommended for CLI usage)"}],"dependencies":[{"reason":"Required for downloading Python build files from URLs. Part of the `[download]` extra.","package":"httpx","optional":true},{"reason":"Required for extracting Python build files compressed with Zstandard. Part of the `[install]` extra.","package":"zstandard","optional":true},{"reason":"Requires Python 3.8 or newer to run the installer itself.","package":"python","optional":false}],"imports":[{"symbol":"install","correct":"from pbs_installer import install"},{"note":"The `download` function is often used internally by `install`, but can be called directly.","symbol":"download","correct":"from pbs_installer import download"}],"quickstart":{"code":"import os\nfrom pbs_installer import install\n\n# Define the target directory for Python installation\ninstall_path = os.path.join(os.getcwd(), \"my_python_env\")\npython_version = \"3.10\" # Example: install CPython 3.10\n\nprint(f\"Attempting to install CPython {python_version} to {install_path}\")\ntry:\n    # Ensure optional dependencies are installed for full functionality, e.g., via `pip install pbs-installer[all]`\n    install(request=python_version, destination=install_path)\n    print(f\"CPython {python_version} installed successfully to {install_path}\")\nexcept Exception as e:\n    print(f\"Error installing Python: {e}\")\n\n# Example of how to verify installation (simplified)\n# This would typically involve checking for the python executable in install_path\npython_executable = os.path.join(install_path, 'bin', 'python') if os.name == 'posix' else os.path.join(install_path, 'python.exe')\nif os.path.exists(python_executable):\n    print(f\"Python executable found at: {python_executable}\")\nelse:\n    print(f\"Python executable NOT found at: {python_executable}\")","lang":"python","description":"This quickstart demonstrates how to use the `install` function from `pbs_installer` to download and install a specific version of CPython into a local directory. It highlights the main entry point for programmatic usage."},"warnings":[{"fix":"Install `pbs-installer` with the `[all]` extra: `pip install pbs-installer[all]`.","message":"Full functionality requires optional dependencies `httpx` and `zstandard`. Without them, downloading might fail (e.g., `ModuleNotFoundError` for `httpx`) or Zstandard-compressed builds cannot be extracted.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Verify your imports: `from pbs_installer import install` and confirm `pypi.org/project/pbs-installer` is the intended library.","message":"There are multiple unrelated Python libraries or projects with 'PBS' in their name (e.g., `pbs-python` for Torque/OpenPBS, `pbs` for subprocess management). Ensure you are importing and using `pbs_installer` from `frostming` for Python Build Standalone installations.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult the `pbs-installer` documentation or source code for supported version string formats. Use precise version numbers.","message":"The `request` parameter for the `install` function expects specific Python version strings (e.g., '3.10', '3.10.4', 'pypy-3.9'). Passing malformed or ambiguous strings might result in a `ValueError` if a matching build cannot be found.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Pass `arch='x86_64'`, `platform='linux'` (or appropriate values) to the `install` function to ensure the correct standalone build is selected.","message":"When installing Python for a different target environment (cross-compiling) or if auto-detection fails, explicitly specifying the `arch` and `platform` parameters in the `install` function is crucial. Omitting them might lead to downloading an incompatible Python build for the current system.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'2026.3.25':55 'activ':40 'autom':23 'build':20,57 'current':52 'download':27 'fashion':36 'frequent':43 'indygreg':16 'instal':2,5,14,29,56 'librari':9,38 'maintain':41 'month':49 'multipl':46 'often':45 'packag':62 'pbs':1,4 'pbs-instal':3 'process':25 'python':8,19,31,60 'python-build-standalon':18 'python-vers':59 'releas':44 'serv':11 'specif':30 'standalon':21,35,58 'time':47 'version':32,54,61","created_at":"2026-03-28T15:18:32.765434+00:00","updated_at":"2026-04-16T19:08:02.049167+00:00","problems":[{"fix":"pip install pbs-installer","cause":"The 'pbs-installer' package is not installed in the current Python environment or the environment is not properly activated.","error":"ModuleNotFoundError: No module named 'pbs_installer'"},{"fix":"Ensure the package is installed with `pip install pbs-installer`, then restart your terminal or verify that the Python environment's script directory is in your system's PATH.","cause":"The 'pbs-installer' command-line tool is not installed or its installation directory is not included in the system's PATH environment variable.","error":"pbs-installer: command not found"},{"fix":"Specify an installation directory where the current user has write permissions using the `--path` argument (e.g., `pbs-installer install 3.10.8 --path ~/.pythons/3.10.8`), or run the command with elevated privileges (`sudo pbs-installer ...`) if installing to a system-wide location is absolutely necessary (though generally discouraged for standalone builds).","cause":"The user is attempting to install a standalone Python build into a system-protected directory where they lack write permissions.","error":"OSError: [Errno 13] Permission denied: '/usr/local/python/3.10.8'"},{"fix":"Clear the local cache using `pbs-installer clear-cache` and then retry the installation. If the issue persists, verify your network connection or check the `python-build-standalone` GitHub releases for any reported issues with the specific build version.","cause":"The downloaded Python build file is corrupted, incomplete, or its checksum no longer matches the expected value, possibly due to a network issue, an interrupted download, or an upstream change to the build artifact.","error":"checksum mismatch for https://github.com/indygreg/python-build-standalone/releases/download/..."},{"fix":"Check the official `python-build-standalone` GitHub releases or the output of `pbs-installer list` for a list of available and supported Python versions for your platform, and use one of those.","cause":"The specified Python version (e.g., '3.10.99') does not have a pre-built standalone package available for the current operating system and architecture on the `python-build-standalone` releases page.","error":"No such Python build exists for version '3.10.99' for platform 'linux-x86_64'."}],"ecosystem":"pypi","meta_description":null,"install_score":100,"quickstart_score":80,"quickstart_tag":"verified","pypi_latest":"2026.8.25","cli_name":"pbs-installer","cli_version":"sh: 1: pbs-installer: not found","type":"library","homepage":null,"github":"https://github.com/frostming/pbs-installer","docs":"http://pbs-installer.readthedocs.io","changelog":null,"pypi":"https://pypi.org/project/pbs-installer/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-27","next_check":"2026-07-28","install_tag":"verified"}}