pythonpackageuploadpypihttp-status-code-400

How to reupload a package to PyPI?


I upload a package to PyPI, but I got some trouble after upload, so I delete it completely, and I tried to re-upload, but there are some error after upload again:

HTTP Error 400: This filename has previously been used, you should use a different version.

It seems PyPI can track the upload activity, I delete project and account and upload again, but I can see the previous record. Why? How can I solve the problem?


Solution

  • In short, you cannot reupload a distribution with the same name due to stability reasons. Here you can read more about this issue at https://github.com/pypa/packaging-problems/issues/74.

    You need to change the distribution's file name, usually done by increasing the version number, and upload it again.