-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry says that "environment seems to be broken" all the time #2756
Comments
@keddad I encountered this problem, when the venv is activated and poetry detect it as broken and than try to recreate it. So make sure your venv is deactivated and run |
Sadly, that didn't really work in my case. I'm clearly not running any venvs:
but |
Ok, that's clearly an issue with how
Since after |
I've recorded a trace of
But I'm still not sure on why is this happening |
I think I am also running into the same issue. I have a local [virtualenvs]
path = ".venv" And |
Ah, now I see what's going on. At the moment you cannot point Related: #1770 fin swimmer |
Before this change, when .venv directory exists within the project root, poetry will use it as the path to the venv regardless whether virtualenvs.in-project is set to true or not. This leads to confusion as described in #1770 and #2756. With this change poetry will check if virtualenvs.in-project is set to true if it finds a .venv folder. This commit also changes the default state of this configuration to be unset (null), in order to not break any current environments. Resolves: #1770 #2756
I am still facing this issue, every time I use any poetry command in the project directory poetry config:
This creates a On further inspection I found out that pip executable/script was not present in |
This is a really old issue and if you're currently experiencing this, I suggest you open a new issue with a reproduction. Make sure that you do not have an existing venv active (especially a deleted or partially broken one) before you run Poetry commands if you want
|
This went away for me when I deactivated my environment and just let poetry create it itself through the automated installation process. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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.
The text was updated successfully, but these errors were encountered: