Python 奇怪的PyPI身份验证行为

Python 奇怪的PyPI身份验证行为,python,distribution,distutils,pypi,Python,Distribution,Distutils,Pypi,我正在尝试将我的包上载到PyPI。它要求我确认,我确认了,它给出了一个确定的响应(除非确认是正确的,否则不会发生),但它声称我没有确认!为什么? [...] 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

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

[...]
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

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

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

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

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