如何在 Windows 上安装 pipx?

Hva*_*res 7 python testing automation pip

我目前正在尝试遵循 CumulusCi 的指南,但在计算机内安装 pipx 时遇到一些问题。

我已经安装了 Python 3 并且当前正在运行以下命令:

pip install --user pipx

'''

The result is the following:


Run Code Online (Sandbox Code Playgroud)

已满足的要求:

pipx in c:\users\aharo\appdata\roaming\python\python39\site-packages (0.16.1.0)

Run Code Online (Sandbox Code Playgroud)

我设置了路径环境变量,当我运行 pipx list 时,它告诉我以下内容:

pipx : The term 'pipx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pipx list
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (pipx:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Run Code Online (Sandbox Code Playgroud)

有谁知道如何解决这个问题?

小智 6

我使用 Windows 10

我去cmd写了下面的内容

python -m pip install --user pipx python -m pipx ensurepath python -m pipx install eth-brownie

回到 Visual Studio Code 并写道:python -m pipx ensurepath


小智 4

我有同样的问题,但快速解决方法是将其运行为py -m pipx list. 我猜,由于 Windows 的原因,它被安装到另一个文件夹中......