Failed to upload packages to PyPI: 410 Gone

The error message is:

Upload failed (410): Gone (This API has been deprecated and removed from legacy PyPI in favor of using the APIs available in the new implementation of PyPI (located at For more information about migrating your use of this API to, please see For more information about the sunsetting of this API, please see

I looked into the solution mentioned in the message and then googled a little bit. Unfortunately, the solutions I found were not working, including updating my local ~/.pypirc file. Like this:

index-servers =  

repository:   or  repository:  

Upgrade to the very latest pip and setuptools; install twine:

pip install -U pip setuptools twine
Edit ~/.pypirc and comment out or remove repository:



Use twine:
twine upload dist/*