POETRY_VIRTUALENVS_IN_PROJECT being ignored or am I doing something wrong? #9407
Unanswered
mkvlrn-cm42
asked this question in
Q&A
Replies: 2 comments 3 replies
-
it works fine, you must be doing something wrong ~/foo$ poetry config virtualenvs.in-project
null
~/foo$ POETRY_VIRTUALENVS_IN_PROJECT=true poetry install
Creating virtualenv foo in /home/dch/foo/.venv
... |
Beta Was this translation helpful? Give feedback.
2 replies
-
How are you setting it? Please always show code. My guess is you're setting it (for the current process, the shell) but not exporting it (for the subprocess, poetry). |
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.
-
According to docs, setting the
POETRY_VIRTUALENVS_IN_PROJECT
environment variable to a true value forces poetry to create.venv
directory inside the project.I have set that variable to
1
andtrue
and it was ignored both times when creating a new project (poetry new my-project
) and then activating the shell (poetry shell
inside the created directory), it just creates the virtualenv in the cache directory:~/.cache/pypoetry/virtualenvs/my-project-HASH-py3.12
.It works fine when I create a
poetry.toml
file with the correct setting there.What could be the problem here?
Python: 3.12.3
Poetry: 1.8.3
env being set in my
.zshrc
file and present/valid when running poetry commandsBeta Was this translation helpful? Give feedback.
All reactions