【发布时间】:2018-01-30 18:41:32
【问题描述】:
我正在尝试将一个包 (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.第四次尝试
按照https://packaging.python.org/guides/migrating-to-pypi-org/#uploading 中的描述创建~/.pypirc 文件
[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?
【问题讨论】:
标签: python upload package pypi