【发布时间】:2017-12-25 16:52:41
【问题描述】:
pypi.python.org has been migrated to pypi.org 之后,尝试像往常一样使用命令将包上传到 PyPI 时出错:
python2.7 setup.py sdist upload
错误信息是:
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)
我查看了消息中提到的解决方案,然后用谷歌搜索了一下。不幸的是,我找到的解决方案不起作用,包括更新我的本地 ~/.pypirc 文件。像这样:
[distutils]
index-servers =
pypi
[pypi]
repository:https://pypi.python.org/pypi or repository:https://upload.pypi.org/legacy/
username:yourusername
password:yourpassword
我仍然收到相同的错误消息。我该怎么办?
【问题讨论】: