-
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
Wrong python version in new installation #3463
Comments
As far as I can tell So this could be normal expected behaviour. |
Dear @sinoroc, Thank you for your reply. Indeed that is the case and you would be on the spot. Unfortunately — my bad, I forgot to mention — I obviously tried removing the caret and "freezing" that specific version, to no avail. That was indeed the very reason I decided to open this ticket. In the end, instead of just uninstalling 3.9.0, I went to the environment variables and moved up the references to 3.6.6. I extensively tried this out with and without the caret (loads and loads of looking at scrolling logs) only to realise and pinpoint that the observable behaviour seems to unmistakably be "fetch the first Python you can muster and carry on". As aforementioned, this seems to be the homecoming of an old glitch. This will not deter me, as I'm getting more and more used to |
@ricardo-reis-1970 I recommend you to edit your initial bug report to reflect that. As it is now, your bug report does not make sense. Additionally, I just tried to recreate your issue, but I could not, it seems to work perfectly fine for me. I am on Linux, though, so it might be a bug that only happens on Windows. As you can see I have multiple Python interpreters installed:
I have a [tool.poetry.dependencies]
python = '3.5.*' And poetry picks up the
|
That's what To create a venv for ``
If you don't have set fin swimmer |
@sinoroc I wish Linux were in the options for this project. Still fighting that good fight... @finswimmer (cool handle!) I'm obviously a newbie to poetry. I was told that all it took was to run I'm starting to believe that a narrow street has been set up where my colleagues only have python 3.6.6, so a random (or any other kind of) choice out of one always goes right, right? I'll be checking out the In any case, thank you both very much. You certainly came to the rescue very promptly and provided some valuable input. And thank @jaharkes for taking notice. |
1. I believe you should really edit your initial message, because as it is it shows perfectly normal behaviour. It does not show what is the issue you are confronted to. And according to your second message there might well be a bug (only on Windows?) that needs fixing. So again, I would recommend you to edit your first message to show what the actual bug is. 2. What @finswimmer is saying, is that you probably should not set 3. In any case, I will repeat what finswimmer said (since the formatting of their message is a bit unclear). You can always call for a specific Python interpreter explicitly: To use Python 3.9:
To use Python 3.6:
Those will create 2 different virtual environments, that can be used independently from one another. 4. If for now, your project is really only compatible with 3.6, while support 3.9 is still only in an experimental phase, then set:
and only edit that value locally to something else (maybe 5. I looked at @jaharkes' PR #3475 and I am not entirely sure exactly how it relates to our issue here. I see some relation, but I am not sure it would be a fix for our issue here. It might be a fix for something slightly different. I might be missing something obvious, though. |
Not sure if it is related, but I still link it here: #2117 |
I might have misread the bug reported here. But if you try to specify a specific range like |
I have the same issue, poetry picks up the incorrect python version for a install without virtualenvs
|
@carantunes Maybe show the |
I guess this is the part that matters..
|
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
I have two version of Python:
I'm currently developing a project that is somewhat locked to 3.6.6, but also running experiments on latest Python, so I need both. I installed 3.6.6 first, so when I run
where python
, I getThis means that simply running
python
will run 3.9.0, as it is ahead in thePATH
.Having said all this, 3.6.6 is still available and here's the very top of my
pyproject.toml
:With this, I was expecting to have
poetry
to create the virtual environment correctly, but it does not. It simply goes to the firstpython.exe
it can find — 3.9.0 — and then nothing will run.Workarounds:
.venv
: highly inconvenient;How can I enforce the Python version? Am I doing something wrong?
This is not a current duplicate, but I came across complaints online from 2 years ago along the same lines, and these were supposed to have been fixed long ago.
The text was updated successfully, but these errors were encountered: