Search code examples
pythonpypidistutilspython-poetry

How can I rename my project on PyPI to fix its capitalization?


My PyPI project has an error in its name. Concretely, it has the wrong capitalization. So, e.g., instead of project I used the name Project.

How can I change the name on PyPI to fix this mistake?


Solution

  • How to change the name of a project depends on what kind of change is made:

    A) Changing the capitalization

    If only the capitalization is wrong, simply fix it in your project's pyproject.toml, update the version with a post release signifier, rebuild, and publish again.

    B) Renaming the project

    Renaming projects in the web interface is not supported. Instead, you need to publish the project again, under a different name. This will create a new project with the correct name, associated to your account. Contrary to A), you do not need to increment the project version, otherwise the steps are identical.

    Note: You may want to explicitly mark the old package name as obsolete if the name was in use for a longer time. See the recommended way to rename a package on PyPI and the pypi-rename cookiecutter template.