I had a similar bug (The virtual environment found in seems to be broken
) using poetry when running scripts with poetry run
or poetry shell
. In my case the issue was that the env variable VIRTUAL_ENV
was set to an old environment I was previously using and was already deleted. Running unset VIRTUAL_ENV
fixed the issue.