pipx
前置需求:Python 3.8+
Linux 安裝:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
- 安裝至
~/.local/bin/pipx
macOS 安裝:
brew install pipx
pipx ensurepath
- 安裝至
/opt/homebrew/bin/pipx
前置需求:Python 3.8+
Linux 安裝:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
~/.local/bin/pipx
macOS 安裝:
brew install pipx
pipx ensurepath
/opt/homebrew/bin/pipx
先裝 pipx,再透過 pipx 安裝 poetry。
安裝:
pipx install poetry
~/.local/bin/poetry
Venv 路徑:
/Users/roy/Library/Caches/pypoetry/virtualenvs
poetry new poetry-demo
poetry add click
poetry add --group dev ruff
poetry add --group debug debugpy
poetry remove --group dev ruff
顯示 venv 的實際路徑:
poetry shell
poetry build
If you want to use Poetry only for dependency management but not for packaging, you can use the non-package mode:
[tool.poetry]
package-mode = false