Search code examples
pythontox

Installing an older version of cli tox


I cannot use the newest version of tox, this is because it automatically installs python3.12, which causes other problems for me, so I must use python3.11


Brew

trying to install an older version via brew does not work

% brew install [email protected]
Warning: No available formula with the name "[email protected]".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for [email protected].

Tox Installation Instructions

The tox installation instructions do not work for me

if I install using pip (% python3 -m pip install --user tox==4.11.3), then there is no cli tox

% tox -e qa                         
zsh: command not found: tox

It appears that I also can't install pipx-in-pipx, running python -m pip install pipx-in-pipx --user gives

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pipx-in-pipx
  Running setup.py clean for pipx-in-pipx
Failed to build pipx-in-pipx
ERROR: Could not build wheels for pipx-in-pipx, which is required to install pyproject.toml-based projects

Solution

  • I ended up fixing this by using the pip installed tox and adding

    export PATH="$PATH:/Users/samgermain/Library/Python/3.9/bin"

    to the end of my ~/.zprofile

    • you may need to add it to ~/.bash_profile depending on what your shell is