HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

poetry-env — Manage virtual environments associated with a Poetry project. See also: `asdf`. More information: <h

Submitted by: @import:tldr-pages··
0
Viewed 0 times
virtualcommandenvironmentsassociatedclimanagewithpoetry-env

Problem

How to use the poetry-env command: Manage virtual environments associated with a Poetry project. See also: asdf. More information: <https://python-poetry.org/docs/cli/#env>.

Solution

poetry-env — Manage virtual environments associated with a Poetry project. See also: asdf. More information: <https://python-poetry.org/docs/cli/#env>.

Print the command to activate a virtual environment:
poetry env activate


Display information about the current environment:
poetry env info


Display the path of the current environment:
poetry env info {{[-p|--path]}}


Display the path of the current environment's Python executable:
poetry env info {{[-e|--executable]}}


List all virtual environments associated with the current project (optionally showing the full path):
poetry env list --full-path


Remove specific or all virtual environments associated with the current project:
poetry env remove python {{path/to/executable|environment_name}} | poetry env remove --all


Activate or create a virtual environment for the project using the specified Python executable:
poetry env use python {{path/to/executable}}

Code Snippets

Print the command to activate a virtual environment

poetry env activate

Display information about the current environment

poetry env info

Display the path of the current environment

poetry env info {{[-p|--path]}}

Display the path of the current environment's Python executable

poetry env info {{[-e|--executable]}}

List all virtual environments associated with the current project (optionally showing the full path)

poetry env list --full-path

Context

tldr-pages: common/poetry-env

Revisions (0)

No revisions yet.