pipx-in-pipx (formerly pipipxx)
pipx-in-pipx (pronounced 'pipx in pipx') is a utility designed to bootstrap pipx itself using pipx. It allows for running or installing pipx into an isolated pipx environment, primarily for ensuring a consistent pipx setup or installing specific pipx versions. The current version is 1.0.1, released in October 2019, indicating a stable but less actively developed codebase.
Common errors
-
ModuleNotFoundError: No module named 'pipx_in_pipx'
cause You are trying to import or reference the internal module using the PyPI package name `pipx-in-pipx` instead of its actual internal module name.fixUse the internal module name `pipipxx`. For command-line execution, `pipx run pipipxx`. For Python imports, `import pipipxx`. -
`pipipxx`: command not found
cause After `pip install pipx-in-pipx`, the `pipipxx` command isn't automatically added to your system PATH unless you use `pipx install`.fixThe recommended way to run this tool is via `pipx run pipipxx [arguments]`. If you want a persistent command, use `pipx install pipx-in-pipx`, and then `pipipxx` should be available in your pipx-managed PATH. -
pipx is not installed.
cause The `pipx-in-pipx` tool itself requires `pipx` to be available on your system to run, as its purpose is to bootstrap or manage `pipx` installations.fixFirst, ensure `pipx` is installed on your system using `python3 -m pip install --user pipx` (if not already installed) before attempting to use `pipx-in-pipx`.
Warnings
- breaking The PyPI package is named `pipx-in-pipx`, but the internal Python module is named `pipipxx`. Attempting to `import pipx_in_pipx` or refer to `pipx-in-pipx` in `pipx run` will result in a `ModuleNotFoundError` or incorrect execution.
- gotcha This library is primarily a command-line tool designed to be executed via `pipx run pipipxx` or `pipx install pipx-in-pipx`. While it's a Python package, it's not typically intended for programmatic import and direct use as a library within other Python scripts.
- gotcha The last release (1.0.1) was in October 2019. While the core concept remains valid, it might not fully leverage or be aware of the very latest features, best practices, or minor behavioral changes in `pipx` itself since that time.
Install
-
pip install pipx-in-pipx
Imports
- pipipxx
import pipx_in_pipx
import pipipxx
Quickstart
pipx run pipipxx -- install --spec 'pipx==1.2.0'