PyPI 400 upload error

微笑、不失礼 提交于 2019-12-03 06:08:24

I had the same problem, and it seems there is no straight fix:

http://sourceforge.net/p/pypi/support-requests/468

However, if you want to upload a source distribution, there is a workaround which is not too ugly. You can build a "zip" archive instead of a "tar.gz" archive. You can control this e.g. via

python setup.py sdist --formats=zip

This way, you obtain a different file name. Then you might append the upload command directly

python setup.py sdist --formats=zip upload

Or you might use twine to upload after building:

twine upload dist/*

This worked for me:

  1. Delete the build, dist, and <package name>.egg-info folders in your root directory.
  2. Change version number in your setup.py file.
  3. Create distribution again. e.g: python setup.py sdist bdist_wheel
  4. Upload distribution again. e.g: twine upload dist/*
  5. enjoy! :-)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!