Replies: 1 comment 1 reply
-
Activate the environment, then poetry will use it. So activate your environment (. .bin/activate or so) then change into the poetry project directory and poetry install. It is documented at the top of https://python-poetry.org/docs/managing-environments/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For a new Python project I normally let Poetry Create a new virtual environment:
I just do
poetry install
and poetry creates a new virtual environment in./.venv
(I have setvirtualenvs.in-project = True
). All packages from the TOML file get installed in there. So far so great! :-)However for some projects I want Poetry to use an existing venv under
/path/to/pre-exesiting/env
and install the packages into this venv.To achieve this I tried
poetry env use /path/to/pre-exesiting/env/bin/python
, but Poetry still creates a new environment in./.venv
. :-(Beta Was this translation helpful? Give feedback.
All reactions