您的位置:首页技术文章
文章详情页

python打包代码上传PYPI出现错误500,虚心求教

【字号: 日期:2022-07-13 10:22:00浏览:46作者:猪猪

问题描述

因为是新手,所以对代码故障问题不是很了解,本来按书上的操作进行的,但是在最后一步上传到PYPI出现了错误500,下面是上传时的代码

RANGEdeMacBook-Pro:beerkf range$ python3 setup.py registerrunning registerrunning checkWe need to know who you are, so please choose either:

use your existing login,

register as a new user,

have the server generate a new password for you (and email it to you), or

quitYour selection [default 1]:

1Username: RangeMPassword: Registering beerkf to https://upload.pypi.org/legacy/Server response (500): <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>

下面再贴上setup代码,不知道是哪里出错了from distutils.core import setup

setup(

name =’beerkf’,version =’1.0.0’,py_modules =’beerkf’,author =’hfpython’,author_email =’hfpython@headfirstlabs.com’,url =’http://www.headfirstlabs.com’,description =’A simple print function for nested list.’,

)

问题解答

回答1:

现在pypi的这个接口已经不能使用了,但是通过pypi上表单的形式进行提交了,如果你想使用接口的方式提交的话,需要安装twine才能使用:

pip install twine

具体操作可以参考上传

标签: Python 编程