Skip to content

Error message from poetry self add referencing pyproject.toml #10179

@johtoblan

Description

@johtoblan

Description

After uninstalling and installing poetry I want to add poetry-plugin-shell to my "main" poetry, but I get an error message claiming poetry-plugin-shell is already present in the pyproject.toml. Which pyproject.toml is 'poetry self' using?

user:~$ poetry self add poetry-plugin-shell
The following packages are already present in the pyproject.toml and will be skipped:

  - poetry-plugin-shell

If you want to update it to the latest compatible version, you can use `poetry self update`.
If you prefer to upgrade it to the latest available version, you can use `poetry self add package@latest`.

Nothing to add.
user:~$ curl -sSL https://install.python-poetry.org | python3 - --uninstall
Removing Poetry (2.0.1)
user:~$ curl -sSL https://install.python-poetry.org | python3 -
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/home/user/TESTPOETRY/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (2.0.1): Done

Poetry (2.0.1) is installed now. Great!

You can test that everything is set up by executing:

`poetry --version`

user:~$ poetry self add poetry-plugin-shell
The following packages are already present in the pyproject.toml and will be skipped:

  - poetry-plugin-shell

If you want to update it to the latest compatible version, you can use `poetry self update`.
If you prefer to upgrade it to the latest available version, you can use `poetry self add package@latest`.

Nothing to add.
user:~$ poetry shell

The command "shell" does not exist.

Workarounds

Using poetry update fixes this. clearing the cache does not seem to affect the knowledge of old plugins

Poetry Installation Method

install.python-poetry.org

Operating System

Ubuntu 24.04

Poetry Version

Poetry (version 2.0.1)

Poetry Configuration

cache-dir = "/home/johannestl/.cache/pypoetry"
installer.max-workers = null
installer.no-binary = null
installer.only-binary = null
installer.parallel = true
installer.re-resolve = true
keyring.enabled = true
requests.max-retries = 0
solver.lazy-wheel = true
system-git-client = false
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/johannestl/.cache/pypoetry/virtualenvs
virtualenvs.prompt = "{project_name}-py{python_version}"
virtualenvs.use-poetry-python = false

Python Sysconfig

sysconfig.log
Paste the output of 'python -m sysconfig', over this line.

Example pyproject.toml

Poetry Runtime Logs

poetry-runtime.log
poetry -vvv self add poetry-plugin-shell

Loading configuration file /home/user/.config/pypoetry/config.toml
Loading configuration file /home/user/.config/pypoetry/auth.toml
The following packages are already present in the pyproject.toml and will be skipped:

  - poetry-plugin-shell

If you want to update it to the latest compatible version, you can use `poetry self update`.
If you prefer to upgrade it to the latest available version, you can use `poetry self add package@latest`.

Nothing to add.

Paste the output of 'poetry -vvv <command>', over this line.
Both configuration files /home/user/.config/pypoetry/config.toml and /home/user/.config/pypoetry/auth.toml are empty

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedstatus/triageThis issue needs to be triaged

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions