Replies: 1 comment 1 reply
-
No, you do not need a project to install Poetry. pipx will automatically install Poetry in a dedicated environment, which is separated from your project's environment.
No, you should not install Poetry into your project's environment. If you want to use pip instead of pipx, you have to do some manual steps. See https://python-poetry.org/docs/#installing-manually You always need one more environment than projects because you need an additional environment for Poetry itself. (You must not activate Poetry's environment, you can just use the Poetry executable.) You can create your environments for your projects manually (so Poetry will use them if they are activated) or let Poetry create them automatically (either in a central directory or in a .venv directory in each of your projects). |
Beta Was this translation helpful? Give feedback.
-
So from my understanding, which is most likely wrong, you first have to navigate to your project, create a virtual environment inside the project directory, and then you run
pipx install poetry
, orpip install poetry
(I would personally prefer usingpip
). And all this results in Poetry getting installed onto your project, where you can then manage dependencies and package your python script.However, the documentation says "Poetry should always be installed in a dedicated virtual environment to isolate it from the rest of your system. It should in no case be installed in the environment of the project that is to be managed by Poetry", so I am a bit confused as to where I should install Poetry.
Can anyone give some recommendations please? I am completely new to Poetry, so forgive me if I make any mistakes or anger you. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions