如何在 Windows 上安装 pipx?

问题描述 投票:0回答:3

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

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

pip install --user pipx

'''

The result is the following:


已满足要求:

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

我设置了路径环境变量,当我运行 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

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

python testing automation pip
3个回答
8
投票

我使用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 的原因,它被安装到了另一个文件夹中......


0
投票

我发现 pipx 安装在以下位置

 c:\users\<username>\appdata\roaming\python\python310\scripts\pipx.exe

转到该位置并运行以下命令

.\pipx.exe ensurepath

重新启动终端或 VS Code,效果非常好

© www.soinside.com 2019 - 2024. All rights reserved.