How can I re-upload package to pypi?

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.


If you are running your local pypi server then you can use -o,--overwrite option which will allow overwriting existing package files.

pypi-server -p 8080  --overwrite  ~/packages &

Yes you can reupload the package with same name.

I had faced similar issue what I did was increased the version number in setup.py and delete the folders generated by running python setup.py sdist i.e. dist and your_package_name-egg.info and again run the commands python setup.py sdist to make the package upload ready.

I think pypi tracks the repo from folder generated by sdist i.e. dist and your_package_name-egg.info so you have to delete it.

Tags:

Python

Pypi