Linux command
poetry-python 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List Python versions
poetry python list
List all versions
poetry python list --all
List only Poetry-managed
poetry python list --managed
Install a specific
poetry python install [3.12]
Install a free-threaded
poetry python install --free-threaded [3.13]
Install a specific implementation
poetry python install --implementation [pypy] [3.10]
Remove a Poetry-managed
poetry python remove [3.12]
说明
poetry python groups subcommands to manage Python versions. The install subcommand downloads and installs Python versions from the Python Standalone Builds project. The list subcommand shows all discovered Python versions including system-managed and Poetry-managed installations. The remove subcommand removes Poetry-managed Python installations. This is an experimental feature introduced in Poetry 2.1.0 and behavior may change in upcoming releases.
参数
- install _VERSION_
- Install the specified Python version from the Python Standalone Builds project.
- list
- Show Python versions available in the environment, including system and Poetry-managed installations.
- remove _VERSION_
- Remove a Poetry-managed Python installation.
- --clean (-c)
- Clean up installation if check fails.
- --free-threaded (-t)
- Use free-threaded version if available (same as requesting a version with trailing "t").
- --implementation (-i) _IMPL_
- Python implementation to use (cpython, pypy).
- --reinstall (-r)
- Reinstall if installation already exists.
- --all (-a)
- List all versions, including those available for download.
- --free-threaded (-t)
- List only free-threaded Python versions.
- --implementation (-i) _IMPL_
- Filter by Python implementation to search for.
- --managed (-m)
- List only Poetry-managed Python versions.
- --free-threaded (-t)
- Remove the free-threaded version.
- --implementation (-i) _IMPL_
- Python implementation to remove (cpython, pypy).
FAQ
What is the poetry-python command used for?
poetry python groups subcommands to manage Python versions. The install subcommand downloads and installs Python versions from the Python Standalone Builds project. The list subcommand shows all discovered Python versions including system-managed and Poetry-managed installations. The remove subcommand removes Poetry-managed Python installations. This is an experimental feature introduced in Poetry 2.1.0 and behavior may change in upcoming releases.
How do I run a basic poetry-python example?
Run `poetry python list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does install _VERSION_ do in poetry-python?
Install the specified Python version from the Python Standalone Builds project.