Poetry Upgrade Project from Python 3.10.x to Python 3.11.0
Asked Answered
D

2

14

I have a poetry based Django project using Python 3.10.2. I would like to upgrade the project to use Python 3.11.0.

What is the proper way to do that?

Should I nuke poetry.lock then update the pyproject.toml to

[tool.poetry.dependencies]
python = "^3.11"

The ability to easily upgrade to newer versions of Python seems like it should be a core feature but I don't see a command to automate the process.

Dimetric answered 1/11, 2022 at 15:39 Comment(2)
try poetry env use python3.11.0 or the full path to that python versionBili
I ended up doing this . . . pyenv local 3.11.0 poetry env use 3.11.0 poetry install When I run poetry env info I see that the location of the env has been moved out of the standard $HOME/.cache/pypoetry/... location and into the project root. It fires up and runs just fine.Dimetric
B
6

try: poetry env use python3.11.0 or the full path to that python version

Bili answered 1/11, 2022 at 16:26 Comment(0)
B
0

poetry env use 3.11.0

try with this,woks fine for me

Boeotian answered 16/3, 2023 at 7:40 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Frontal

© 2022 - 2024 — McMap. All rights reserved.