无法再将包上传到PyPI

时间:2017-08-22 12:55:45

标签: python upload package pypi

我试图将一个包(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。第五次尝试

repository:https://pypi.python.org/pypi

中删除~/.pypirc

并且正在运行:

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?

1 个答案:

答案 0 :(得分:0)

似乎Pypi API不再支持upload命令......

如果您想将项目上传到Pypi,请使用Twine。 该文档可在此处https://pypi.python.org/pypi/twine

获取
相关问题