-
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 not using specified virtual environment #6141
Comments
I have also the same problem! |
Linking to my comment here in case it's the same issue: #6565 (comment) I found Poetry could not find the virtualenv it was being run from, but if I change the |
@john-sandall you have a different issue -- please open a new issue if you can reproduce it in a container. |
@finswimmer @neersighted This may help, I have a way to repo this situation: You first need pyenv installed, and then python 3.10 + 3.9 installed via pyenv. You then activate both versions of python:
Then activate both versions, so you can use either version depending on the particular project's requirements. I work on multiple projects and some need 3.10 and others need 3.9. Need to activate both so pyenv knows what minor version of python to use for
Next, you create a basic project via poetry, but tell it the python version to use is
Then you do a poetry install, it will say that 3.10.7 is not supported, it then find 3.9.14 and tries to use that:
After dependencies are installed, poetry thinks it's using 3.9, but the actual version of python in the virtual-env is 3.10:
I am using poetry 1.2.2:
The workaround I've found is if you do
|
@joshorr Thanks a lot for providing this step by step guide 👍 However, I'm not able to reproduce this with Poetry 1.2.2. Which version are you using? fin swimmer |
Using 1.2.2; i mentioned it in the step by step guide. I suppose I could try this out in a blank machine, see if it’s something with my environment. It very reliably repo’s for me with my current setup. |
I swear it wasn't there when I read it 🤞 😄 🙈 |
It seems like I was able to reproduce this in a docker container build I did the other day. I'll try to clean and simplify it up to the bare minimum and post something early next week. |
Hello everyone, you haven't come back to this issue for a long while. So I assume this is solved in the meantime and I can close this ticket. Feel free to leave a comment if you disagree. fin swimmer |
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).1.1.14
Issue
Poetry seems to use a different python version when installing packages than specified in the install output:
Poetry claims to use
Using python3 (3.9.13)
, but when installing, it uses the3.10.6
python.The text was updated successfully, but these errors were encountered: