mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-19 20:50:26 +00:00
31 lines
921 B
Plaintext
31 lines
921 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# poetry-env
|
|
|
|
> Manage virtualenvs associated with a Poetry project.
|
|
> See also: `asdf`.
|
|
> More information: <https://python-poetry.org/docs/cli/#env>.
|
|
|
|
- Print the command to activate a virtualenv:
|
|
|
|
`poetry env activate`
|
|
|
|
- Display information about the current environment (-p or -e will display the environment's path or executable):
|
|
|
|
`poetry env info {{[-p|--path]}} {{[-e|--executable]}}`
|
|
|
|
- List all virtualenvs associated with the current project (optionally showing the full path):
|
|
|
|
`poetry env list --full-path`
|
|
|
|
- Remove specific or all virtualenvs associated with the current project:
|
|
|
|
`poetry env remove python {{path/to/executable|environment_name}} | poetry env remove --all`
|
|
|
|
- Activate or create a virtualenv for the project using the specified python executable:
|
|
|
|
`poetry env use python {{path/to/executable}}`
|