【问题标题】:Weird PyPI authentication behavior奇怪的 PyPI 身份验证行为
【发布时间】:2010-12-17 12:52:36
【问题描述】:

我正在尝试将我的包上传到 PyPI。它要求我识别,我做了,它给出了一个 OK 响应(除非识别正确,否则不会发生),但随后它声称我没有识别!为什么?

[...]
removing 'build\bdist.win32\egg' (and everything under it)
running register
We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]:  1
Username: coolRR
Password:
Server response (200): OK
running upload
Submitting dist\garlicsim-0.1.zip to http://pypi.python.org/pypi
Upload failed (401): You must be identified to edit package information
removing 'build' (and everything under it)
error: garlicsim-0.1: No such file or directory

【问题讨论】:

  • 您尝试运行的确切命令是什么,以及您指定的所有选项?

标签: python distribution distutils pypi


【解决方案1】:

您使用的是旧版本的 Python(结果是 Distutils)。此错误已由 Tarek Ziade 在 r68415 2009-01-09 中修复。尝试使用之后发布的任何 Python 2.x 版本上传。

【讨论】:

    【解决方案2】:

    我自己从未遇到过这种情况,但有一些事情需要检查:

    1. 确保您可以使用浏览器使用用户名和密码登录 PyPI。
    2. 检查 ~/.pypirc 的内容是否正确。如果它不存在,请尝试创建它。
    3. 检查您的 setup.cfg 文件以确保所有 PyPI 设置(如果有)都是正确的。
    4. 在运行命令上传/注册之前尝试将包构建为单独检查,然后尝试 python setup.py 上传。

    【讨论】:

      猜你喜欢
      • 2011-01-01
      • 1970-01-01
      • 2021-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多