Failed to upload packages to PyPI: 410 Gone
pypi server url
twine upload to artifactory
login to pypi
python repository url
After pypi.python.org has been migrated to pypi.org, I got an error when trying to upload a package to PyPI using the command as usual:
python2.7 setup.py sdist upload
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 PyPI.org implementation of PyPI (located at https://pypi.org/). For more information about migrating your use of this API to PyPI.org, please see https://packaging.python.org/guides/migrating-to-pypi-org/#uploading. For more information about the sunsetting of this API, please see https://mail.python.org/pipermail/distutils-sig/2017-June/030766.html)
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:
[distutils] index-servers = pypi [pypi] repository:https://pypi.python.org/pypi or repository:https://upload.pypi.org/legacy/ username:yourusername password:yourpassword
I still got the same error message. What should I do?
Upgrade to the very latest pip and setuptools; install twine:
pip install -U pip setuptools twine
~/.pypirc and comment out or remove
Use twine to upload your module to pypi from within the folder containing the module source, setup.py, and other files:
python setup.py sdist twine upload dist/*
Upgrade to the very latest pip and setuptools; install twine: pip install -U pip setuptools twine. Edit ~/.pypirc and comment out or remove Failed to upload packages to PyPI: 410 Gone. 7; After pypi.python.org has been migrated to pypi.org, Upload failed (410): Gone (This API has been deprecated and
Upgrade to the very latest pip and setuptools; install twine: pip install -U pip setuptools twine. Edit ~/.pypirc and comment out or remove Can't upload package to PyPI anymore [duplicate] Ask Question Asked 2 years, 8 months ago. Active 2 years, 8 months ago. Upload failed (410): Gone (This API has
I recommend using twine.
Just install it:
pip install twine
And simply do:
twine upload dist/*
Note: Do this from root of your project
Failed to upload packages to PyPI: 410 Gone. upload to pypi pypi upload legacy upload package twine pypi upload repository url twine install twine upload Uploads through pypi.python.org were switched off on July 3, 2017. As of April 13th, 2018, pypi.org is the URL for PyPI. The recommended way to migrate to PyPI.org for uploading is to ensure that you are using a new enough version of your upload tool. The default upload settings switched to pypi.org in the following versions: twine 1.8.0. setuptools 27.0.0
Registering works on testpypi but not on the real pypi. Registering is useful if one is not able to upload the package (eg larger than PyPI's size I am having trouble uploading a package. Why is this? Code: $ python setup.py register sdist upload running register running egg_info writing markdowntable.egg-info\PKG-INFO writing dependency_links to markdowntable.egg-info\dependency_l
357045/357045 - 00:00:00 HTTPError: 410 Client Error: Gone (This API has I followed the official documentation for uploading packages to PyPI, as well Upload failed (400): home_page: Invalid URI error: Upload failed This also means you can't use setup.py to upload the file, since setup.py will only let you upload a file that it has created in the currently executing command, not an already created file. That doesn't make it impossible to upload a file with the same hash, but it makes it tricky which suggests it's a bad UX to expect authors to have to navigate.
It allows to upload, test and install packages from devpi indexes. be found in pypirc. the 410 status for the register action isn't marked as error anymore for push to fix #622: deletion of package with inherited versions failed. Notice how PCA has failed to project out the noise, a result of a high noise variance in the third dimension. LDA also struggles to recover the concentric pattern since the classes themselves are not linearly separable.
- Thank you, that fixed my problem. Plus, I need to run
python setup.py sdistto create some dist/* first before
twine upload dist/*. I hope this answer will be useful to other people.
- Thanks all, this got me most of the way when I had a similar problem. One extra detail was that you might need to ensure you have Python version to 2.7.9+ otherwise (for me) the
twine upload...command fails with SSL/TLS errors.
- It's best to not specify repository at all and let twine decide where to upload.
- From official guidelines: " you should edit your ~/.pypirc so that it removes any explicit mention of an URL."
- On Python 2.7.10 (macOS) I get this error:
OSError: [Errno 2] No such file or directory: '/Library/Python/2.7/site-packages/setuptools-20.3.1-py2.7.egg'
- What is the new url for the test site the old one was: testpypi.python.org/pypi
- Found it here: packaging.python.org/guides/migrating-to-pypi-org/#uploading
python setup.py registerand
python setup.py uploadare deprecated. Do not use them.