PyCharm
 
Get PyCharm

Configure a Poetry environment

Last modified: 20 January 2025

Poetry is a tool that facilitates creating a Python virtual environment based on the project dependencies. You can declare the libraries your project depends on, and Poetry will install and update them for you.

Project dependencies are recorded in the pyproject.toml file that specifies required packages, scripts, plugins, and URLs. See the pyproject reference for more information about its structure and format.

To use Poetry in PyCharm, you need to install it on your machine and create a specific Python environment.

If you select a Poetry environment when creating a new Python project, PyCharm creates pyproject.toml with the project requirements.

Each time you modify the pyproject.toml file, PyCharm notifies you and offers two actions: to record the changes in the poetry.lock file (poetry lock) or to record the changes and install the unsatisfied requirements (poetry update).

Lock or update poetry