-
Notifications
You must be signed in to change notification settings - Fork 1
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
Contraditory warning from poetry shell
on Poetry 1.2.2
#11
Comments
Hey @staticdev, by default Poetry will use the interpreter it was installed with to create a new venv. If it should instead take whatever is the activated Python in your current shell set fin swimmer |
@finswimmer thanks a lot for the prompt response and clarification! It was very helpful =) I did
This two points made me confused, even using poetry for years now. Questions:
|
@finswimmer I am having same problem on Mac, but this time
poetry use env also does not change the result. |
I'm also experiencing a similar issue, which seems to contradict the documentation here: https://python-poetry.org/docs/managing-environments/
While I am using pyenv, I don't think the prefer-active-python setting is relevant here. I don't care if poetry uses the currently active version but I would like it to use a version that meets the project dependencies, and it looks like it is trying to :) Poetry was installed using python 3.9.13 initially. I have 3.9.13 and 3.10.6 available via pyenv. My current project wants ^3.10
poetry should look for python 3.10.x and create the virtual environment using the discovered version, or prompt otherwise. From the output, it appears to find 3.10.6 but when I inspect the created virtual environment afterwards, it is python 3.9.13
edit: including my current poetry config
edit2:
With
|
@staticdev a potential workaround for your initial issue is to run poetry env use before any venv with the -py3.10 suffix exists.
|
At a glance, this looks like it might be the same behaviour as python-poetry/poetry#7158 |
Relevant part:
-vvv
option) and have included the output below.Issue
I have many versions of Python installed with Pyenv, but my settings are:
I have created a virtualenv with
poetry install
and when I dopoetry shell
I get:I don't understand this warning since my venv was created with py3.10, my pyenv only has 3.10 and it says
python3 (3.10.6)
.Then after
poetry shell
I get error with:Successful
env use 3.10.6
and again same error:I also tried deleting the folder
/home/user/.cache/pypoetry/virtualenvs/project-0KWPzb1N-py3.10
and creating again the environment but I get the same warning and errors:The text was updated successfully, but these errors were encountered: