Skip to content

Troubleshooting

Lokesh Kumar edited this page Aug 7, 2026 · 1 revision

Troubleshooting

If you run into issues while installing or using pkgwrap, check these common problems and their solutions.

'pkgwrap: command not found' after install

Cause: Your system's local Python binary directory is not in your PATH environment variable. This frequently happens when installing via pip as a non-root user. Solution: Add the local bin directory to your PATH.

  1. Open your shell configuration file (e.g., ~/.bashrc or ~/.zshrc).
  2. Add the following line to the end of the file:
    export PATH="$HOME/.local/bin:$PATH"
  3. Reload your terminal session or run source ~/.bashrc (or source ~/.zshrc).

sudo prompt loops or fails

Cause: pkgwrap identified that an operation requires administrative privileges, but the sudo command is either not installed or improperly configured on your system. Solution: Verify that sudo is installed by running which sudo. If it is missing (which is common in minimal Docker containers or base Debian images), you need to install it (e.g., apt install sudo) and configure your user, or simply run pkgwrap directly as the root user.

Wrong backend detected

Cause: To maximize speed, pkgwrap caches the detected backend during its first run. If you migrate your environment, install a new package manager, or change system configurations, this cache can become stale. Solution: Force pkgwrap to re-detect your environment by deleting the cache file:

rm ~/.config/pkgwrap/backend.json

After deleting the file, run pkgwrap --backend to ensure the correct package manager is now being detected.

ModuleNotFoundError: No module named pkgwrap

Cause: If you installed pkgwrap from source using a Python virtual environment (venv), that environment must be active for the command to work. Solution: Activate the virtual environment from the root of the cloned repository before running the command:

source venv/bin/activate

If you want to use the tool anywhere without activating an environment, consider installing it normally via PyPI (pip install pkgwrap-lokesh) or using the provided install.sh script.

Clone this wiki locally