2.7.7. pipx¶
GitHub: https://github.com/pypa/pipx
简介¶
Install and Run Python Applications in Isolated Environments
警告
It is not recommended to install pipx via pipx. If you’d like to do this anyway, take a look at the pipx-in-pipx project and read about the limitations there.
安装¶
brew install pipx
// Ubuntu 23.04 or above
sudo apt install pipx
// Ubuntu 22.04 or below
python3 -m pip install --user pipx
// windows
scoop install pipx
使用¶

代码:
>> pipx install pycowsay
installed package pycowsay 2.0.3, Python 3.7.3
These apps are now globally available
- pycowsay
done! ✨ 🌟 ✨
>> pipx list
venvs are in /home/user/.local/share/pipx/venvs
apps are exposed on your $PATH at /home/user/.local/bin
package pycowsay 2.0.3, Python 3.7.3
- pycowsay
# Now you can run pycowsay from anywhere
>> pycowsay mooo
____
< mooo >
====
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
命令 pipx run APP [ARGS...]
// Notice that you don't need to execute any install commands to run the app.
> pipx run pycowsay moo
---
< moo >
---
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||