1

I need to downgrade my version of poetry to version 1.2.1.

Currently, it's 1.2.2.

>>> poetry --version
Poetry (version 1.2.2)

I use the following command:

>>> curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.2.1 python3 -
Retrieving Poetry metadata

The latest version (1.2.1) is already installed.

But I'm told that 1.2.1 is already installed. Yet the poetry version is still stuck on the original.

>>> poetry --version
Poetry (version 1.2.2)

The answer given here doesn't work (poetry self update@1.2.1) => The command "self" does not exist.

What am I doing wrong here?

Ian
  • 3,605
  • 4
  • 31
  • 66

4 Answers4

16

One can downgrade (or upgrade) poetry through poetry self update command.

So, you can downgrade to 1.2.1 by running:

poetry self update 1.2.1
Xavi Moreno
  • 201
  • 1
  • 3
2

if you want to install specific version in python hereit is ,

pip install poetry==1.2.1

In Future just simplpe

pip install 'Your Library Name'== 'Specific version'
ZAVERI SIR
  • 317
  • 4
  • 14
  • 5
    This is only true, if you have installed Poetry via `pip`. This is explicit not recommended. Always install Poetry in it own isolated environment. Please refer to the [install instructions](https://python-poetry.org/docs/#installation) for more details. – finswimmer Dec 20 '22 at 10:27
0

I made sure to run terminal as administrator I then install poetry 1.2.2 with the command

pip install poetry=="1.2.2"

it installed successfully, then installed the "1.2.1" version with:

pip install poetry=="1.2.1"

The new install with a lower version automatically removed the version="1.2.2".

after you install what you need, i recommend you restart your terminal before running anything python. Maybe that will help.

if the above does not work, uninstall all poetry related packages then reinstall the 1.2.1 version.

0

If you need to manage multiple versions of poetry, then the poetry developers recommend pipx.

A bit ironic, since poetry's job is managing software versions. Quis custodiet ipsos custodes?

chrishmorris
  • 287
  • 1
  • 6