Poetry says that "environment seems to be broken" all the time
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: Fedora 32
-
Poetry version: 1.0.10
-
Link of a Gist with the contents of your pyproject.toml file: Link
-
I’ve also done
poetry config virtualenvs.path .venv
Issue
Apparently, poetry invalidates virtual environment even if literally nothing happened to it. Here is an example where I install a package and and try to list packages, but it says that environment is broken and installs it again: Gist. My only idea is that PyCharm, which is configured to use the venv, messes something up but it shouldn’t write anything in venv, I guess.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
I think I am also running into the same issue.
I have a local
poetry.toml
:And
virtualenvs.in-project
is set tofalse
globally.Ah, now I see what’s going on. At the moment you cannot point
virtualenvs.path
to.venv
as this is some kind of reserved location for poetry. Whenever it finds a.venv
folder within the project it asumes that this is the folder with the venv. But this is not the case here with this setting, because it just defines the root folder in which the folders for the venvs will be placed.Related: https://github.com/python-poetry/poetry/issues/1770
fin swimmer