Context
- I want Poetry to use Python 3.12.x.
- Poetry is installed globally, and I’ve set Pyenv to default to 3.12 globally on my machine.
- I’m using VSCode.
- In the terminal in my project, I’ve done
poetry install
, andpoetry env use 3.12
which successfully created a venv - Within VSCode I manually selected the python interpreter within that new venv.
Unexpected behavior
When I do poetry debug info
I get the following:
Poetry
Version: 1.8.2
Python: 3.11.4
Virtualenv
Python: 3.12.1
Implementation: CPython
Path: /Users/user/Library/Caches/pypoetry/virtualenvs/project-LrBQS-9F-py3.12
Executable: /Users/user/Library/Caches/pypoetry/virtualenvs/project-LrBQS-9F-py3.12/bin/python
Valid: True
Base
Platform: darwin
OS: posix
Python: 3.12.1
Path: /Users/user/.pyenv/versions/3.12.1
Executable: /Users/user/.pyenv/versions/3.12.1/bin/python3.12
Question
Why does “Poetry” report version 3.11.4? How can I specify ^3.12?
It’s not my global python, it’s not the interpreter my VSCode is using (or by extension the interpreter in the active venv), and I don’t have any dependencies that require 3.11.