安装旧版 cli tox

0 投票
1 回答
18 浏览
提问于 2025-04-12 19:19

我无法使用最新版本的tox,因为它会自动安装python3.12,这给我带来了其他问题,所以我必须使用python3.11。


Brew

通过brew尝试安装旧版本并不成功。

% brew install tox@4.11.3
Warning: No available formula with the name "tox@4.11.3".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for tox@4.11.3.

Tox安装说明

tox的安装说明对我来说不管用

如果我用pip安装(% python3 -m pip install --user tox==4.11.3),那么就没有cli tox。

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

看起来我也无法安装pipx-in-pipx,运行python -m pip install pipx-in-pipx --user会出现错误。

  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

1 个回答

0

我最后是通过使用 pip 安装的 tox 来解决这个问题,并在我的 ~/.zprofile 文件末尾添加了

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

  • 根据你使用的命令行工具,你可能需要把它添加到 ~/.bash_profile

撰写回答