gpt4 book ai didi

python - 上传失败(403): Invalid or non-existent authentication information: Python

转载 作者:行者123 更新时间:2023-12-01 08:34:39 28 4
gpt4 key购买 nike

我正在尝试分发示例包。我正在执行以下提到的步骤:

1) python.exe setup.py 注册

在这里,我决定使用现有的登录名并提供我的用户名和 pssaword。我收到此消息:

enter image description here

2) python.exe setup.py sdist upload

但是当我触发此命令时,我在摘要中收到上述错误。 enter image description here

这是我的目录结构 enter image description here

我正在按照 Head First Python 书中提到的步骤进行操作。有人可以指导我吗?我错过了一些步骤吗?

我还上传了我的设置文件的内容。 enter image description here

注意:我是 python 初学者,刚刚开始学习它。

最佳答案

python setup.py registerpython setup.py uploaddeprecated 。不要使用它们。

按照Python Packaging Guide中的说明进行操作:

  1. PyPI 创建帐户如果你还没有。
  2. 为您的包创建源代码发行版和wheel:python setup.py sdist bdist_wheel
  3. 安装twine (或者确保您有 2.0 或更高版本):pip install twine
  4. 检查您的分发文件是否有错误:twine check dist/*
  5. (可选)Upload to the PyPI test server首先(注意:需要单独的用户注册):twine upload --repository-url https://test.pypi.org/legacy/dist/*
  6. 上传到 PyPI:twine upload dist/*

要保存输入 PyPI 凭据,请使用以下内容创建 $HOME/.pypirc:

[pypi]
username = <username>
password = <password>

Note: your password will be stored in plain text!

关于python - 上传失败(403): Invalid or non-existent authentication information: Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53779509/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com