Skip to main content

PIPXX - Wrapper for pipx to add some minor functionality

PyPi

Note: This project has been superceded by my pipxu project which is a new implementation of pipx that uses uv.

pipxx is a simple command line utility to wrap the usage of pipx to provide some minor improved functions. Consider pipxx a proof of concept of some ideas for pipx.

  1. Global application installation by root.
  2. Enhancement of pipx list output.
  3. Automatic determination of pyenv Python path for install.
  4. Substitution of current directory with package name for uninstall.

See the description of these enhancements below.

pipxx is merely a wrapper for pipx so takes exactly the same command line arguments and options. Just run pipxx the same as you would run pipx. Type pipx or pipx -h to view the usage summary for pipx (or type pipxx or pipxx -h to see the same usage summary).

The latest version and documentation is available at https://github.com/bulletmark/pipxx.

Enhancement 1: Global application installation by root

pipx is used normally to install applications for a single user. It can also install applications globally as root but that is awkward because you have to manually set environment variables. pipxx recognises when it is run as root (or with sudo) and automatically sets appropriate system global PIPX_BIN_DIR, PIPX_MAN_DIR, and PIPX_HOME directories for pipx.

E.g. to install application as normal user:

$ pipxx install cowsay

To install application for all users (i.e. globally):

$ sudo pipxx install cowsay

Note, to see the global directories selected by pipxx for your system:

$ sudo pipxx environment

Enhancement 2: Improved pipx list output

pipx list output lacks some useful information. pipxx adds the following to the pipx list output:

  1. The PyPi package name, or source directory, or VCS URL from where the application was installed from,
  2. Whether the application is installed as editable.

Enhancement 3: Automatic determination of pyenv Python path for install

When installing, you can tell pipx to use a specific version/path of Python using the --python option. Unfortunately, you have to specify the full path to the python interpreter you want. Very commonly, pyenv is used to install multiple versions of Python.

So to use a specific pyenv Python version with pipx you have to type:

$ pipx install --python ~/.pyenv/versions/3.12.0/bin/python cowsay

With pipxx you merely have to type:

$ pipxx install --python 3.12 cowsay

I.e. pipxx will work out from 3.12 that you want the path ~/.pyenv/versions/3.12.0/bin/python, i.e. the latest 3.12 version installed at the time of this example. You could alternately type pipxx install --python 3 cowsay, or pipxx install --python 3.12.0 cowsay.

Note the automatically selected path is dependent on your system/installation and is derived by pipxx from the output of pyenv root.

Actually, --python is a commonly used option but unfortunately pipx does not provide a short-form option for it. So pipxx also adds -P as an alias for --python allowing you to simply type:

$ pipxx install -P 3.12 cowsay

Note that pipxx also adds a description of the added pyenv version option and the added -P alias option to the install --help output.

Enhancement 4: Substitution of current directory with package name for uninstall

Developers often use pipx to install and run an application they are working on from a local source directory. E.g. for an example application myapp:

$ pwd
/home/myname/src/myapp
$ pipx install -e .
installed package myapp <...>

To uninstall this application you have to type pipx uninstall myapp. However, thinking symmetrically, you would expect pipx uninstall . would suffice. So pipxx adds the ability to do this:

$ pipxx uninstall .
uninstalled myapp!

Installation or upgrade or removal

Note pipxx is on PyPI so just ensure that pipx is installed then type the following:

To install:

$ pipx install pipxx

To upgrade:

$ pipx upgrade pipxx

To remove:

$ pipx uninstall pipxx

pipxx requires Python >= 3.7 and requires no 3rd party packages. It requires that pipx is in your $PATH.

License

Copyright (C) 2023 Mark Blakeney. This program is distributed under the terms of the GNU General Public License. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at http://www.gnu.org/licenses/ for more details.

Metadata

Release files for pipxx 1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipxx 1.11
File Size Uploaded
pipxx-1.11.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pipxx 1.11
File Interpreter ABI Platform
pipxx-1.11-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / pipxx-1.11.tar.gz

Download URL pipxx-1.11.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bb5ea2d3e8d4c6796541c1a5c3e2bbf4df98e4d2d83b7829c2d4360df19ee582
BLAKE2b-256 checksum
How to use checksums
6c183f893c553705dd788e16554964c694d05427a7cc53b7f90294b98832f868
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.18

Release files / pipxx-1.11-py3-none-any.whl

Download URL pipxx-1.11-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb46495a2417ab8d25275ea0b3376fde986eede8dae066007339e812953cc29c
BLAKE2b-256 checksum
How to use checksums
65b3567ddbc7653cc440e4e7dad77dc0aece47d4a47d7b20a2049ed8555167b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.18

Release history Release notifications | RSS feed

This release

1.11 This release

2 release files

1.10

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5.1

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page