无法再将包上传到 PyPI
Can't upload package to PyPI anymore
我正在尝试将一个包 (https://github.com/chembl/standardiser) 上传到 PyPI,这个我做了很多次都没有任何问题。
我使用安装了 Python 2.7.13 的 conda 环境。
1.第一次尝试:
python setup.py sdist upload
错误:
Submitting dist/standardiser-0.1.9.tar.gz to https://pypi.python.org/pypi
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)
error: 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)
2。第二次尝试:
python setup.py sdist upload -r https://www.python.org.pypi
错误:
error: <urlopen error [Errno 8] nodename nor servname provided, or not known>
3。第三次全系统尝试 Python 2.7.3:
python setup.py sdist upload
Error:
Creating tar archive
removing 'standardiser-0.1.9' (and everything under it)
running upload
Submitting dist/stardiser-0.1.9.tar.gz to https://upload.pypi.org/legacy
error: None
该包仍然不在 PyPI 中
4.第四次尝试
正在创建 ~/.pypirc
文件,如 https://packaging.python.org/guides/migrating-to-pypi-org/#uploading
中所述
[distutils]
index-servers =
pypi
[pypi]
repository:https://pypi.python.org/pypi
username:MY_ACTUAL_USERNAME
password:MY_ACTUAL_PASSWORD
和运行:
python setup.py sdist upload
错误:同1.
5.第五次尝试
从 ~/.pypirc
中删除 repository:https://pypi.python.org/pypi
行
和运行:
python setup.py sdist upload
错误:同1.
6.第六次尝试
旧版 ~/.pypirc
[distutils]
index-servers =
pypi
[pypi]
repository: https://upload.pypi.org/legacy/
username: MY_ACTUAL_USERNAME
password: MY_ACTUAL_PASSWORD
和运行:
python setup.py sdist upload
错误:同1.
关于如何将我的包上传到 PyPI 的任何其他提示?
Pypi 似乎不再支持上传命令 API ...
如果您想将项目上传到 Pypi,请使用 Twine。
文档可在此处获得 https://pypi.python.org/pypi/twine
我正在尝试将一个包 (https://github.com/chembl/standardiser) 上传到 PyPI,这个我做了很多次都没有任何问题。
我使用安装了 Python 2.7.13 的 conda 环境。
1.第一次尝试:
python setup.py sdist upload
错误:
Submitting dist/standardiser-0.1.9.tar.gz to https://pypi.python.org/pypi
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)
error: 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)
2。第二次尝试:
python setup.py sdist upload -r https://www.python.org.pypi
错误:
error: <urlopen error [Errno 8] nodename nor servname provided, or not known>
3。第三次全系统尝试 Python 2.7.3:
python setup.py sdist upload
Error:
Creating tar archive
removing 'standardiser-0.1.9' (and everything under it)
running upload
Submitting dist/stardiser-0.1.9.tar.gz to https://upload.pypi.org/legacy
error: None
该包仍然不在 PyPI 中
4.第四次尝试
正在创建 ~/.pypirc
文件,如 https://packaging.python.org/guides/migrating-to-pypi-org/#uploading
[distutils]
index-servers =
pypi
[pypi]
repository:https://pypi.python.org/pypi
username:MY_ACTUAL_USERNAME
password:MY_ACTUAL_PASSWORD
和运行:
python setup.py sdist upload
错误:同1.
5.第五次尝试
从 ~/.pypirc
repository:https://pypi.python.org/pypi
行
和运行:
python setup.py sdist upload
错误:同1.
6.第六次尝试
旧版 ~/.pypirc
[distutils]
index-servers =
pypi
[pypi]
repository: https://upload.pypi.org/legacy/
username: MY_ACTUAL_USERNAME
password: MY_ACTUAL_PASSWORD
和运行:
python setup.py sdist upload
错误:同1.
关于如何将我的包上传到 PyPI 的任何其他提示?
Pypi 似乎不再支持上传命令 API ...
如果您想将项目上传到 Pypi,请使用 Twine。 文档可在此处获得 https://pypi.python.org/pypi/twine