How to manage Python projects with Poetry

Now you are ready to begin the project in earnest. All you have to remember from this point forward is to use Poetry—and only Poetry—to manage all dependencies and virtual environments for the project.

Removing a Poetry virtual environment

By default, a Poetry-managed virtual environment lives in a central directory on the system, away from any projects associated with it. As a result, deleting a project directory does not also delete the corresponding virtual environment, as Poetry doesn’t track such things automatically. You have to remove centrally managed virtual environments yourself.

To do this, go to the root directory of the Poetry project in question and issue the command poetry env remove python (or poetry env remove py, for Windows). Note that if you’ve overridden Poetry’s default behavior and placed the environment in your project directory, you can just delete the environment manually; just remember that doing this defeats one of Poetry’s best features.

Donner Music, make your music with gear
Multi-Function Air Blower: Blowing, suction, extraction, and even inflation

Leave a reply

Please enter your comment!
Please enter your name here