-
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 shell failing to set up my .venv local environment #5690
Comments
@epomatti can you try manually creating a virtual env and see what you get? # if you are using a specific python binary, use that instead
python -m pip install virtualenv
python -m virtualenv venv-test And maybe also post the output of It is likely that sys.prefix is incorrectly used when creating the venv. |
@abn I got this And the site:
|
@epomatti from what I can tell, the issue is most likely with |
@abn I'll keep reading venv docs. In the meanwhile I opened an SO and will report here if I find it. Looks like we can close it. |
This creates the subdirectories accordingly. Will try to figure out why.
|
I ended up re-creating my Ubuntu installation it works normally now. |
Odd. Thanks for closing the loop @epomatti . |
@abn here is the explanation: pypa/setuptools#3278 Case closed. |
Thanks for closing the loop (again) @epomatti. Much appreciated. 💜 |
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. |
-vvv
option).Issue
My project is set up to use in-project virtual environments. My
poetry.toml
:I make sure that my envs are empty:
$ poetry env list # envs are empty
I install the dependencies, and it creates the
.venv
directory in the root of my project. The command appears to complete successfully, but there is a problem.The problem is that virtual env shell did not initiate. It doesn't have the
(.venv)
prefix in my terminal.If I try
poetry shell
I get the following warning:It appears to be broken. But why didn't it tell me so in the previous command?
Now if I exit and try again, then it shows what it seems to be the root cause:
It is trying to to call
.venv/bin/activate
which doesn't exist, because it has been created as.venv/local/bin/activate
. Why?Now to add to this whole thing, even if I manually activate it with
source .venv/local/bin/activate
, VS Code is not recognizing the environment, and I also can't add new packages.What is going on?
The text was updated successfully, but these errors were encountered: