[英]Upload failed (403): Invalid or non-existent authentication information: Python
I am trying to distribute a sample package.我正在尝试分发示例包。 I am following the below mentioned steps:
我正在遵循以下提到的步骤:
1) python.exe setup.py register
1)
python.exe setup.py register
Here I decide to use the existing login and provide my username and pssaword.在这里,我决定使用现有的登录名并提供我的用户名和 pssaword。 I get this message:
我收到这条消息:
2) python.exe setup.py sdist upload
2)
python.exe setup.py sdist upload
But when I fire this I get the above mentioned error in the summary.但是当我触发它时,我在摘要中收到上述错误。
This is my directory structure这是我的目录结构
I am following the steps as mentioned in Head First Python book.我正在遵循 Head First Python 书中提到的步骤。 Can some one please guide me?
有人可以指导我吗? Am I missing some step?
我错过了一些步骤吗?
I am also uploading my contents of my setup file.我也在上传我的安装文件的内容。
NOTE: I am a beginner in python and have just started learning it.注意:我是 Python 的初学者,刚刚开始学习它。
python setup.py register
and python setup.py upload
are deprecated . python setup.py register
和python setup.py upload
已弃用。 Do not use them.不要使用它们。
Follow the instructions in the Python Packaging Guide :按照Python 打包指南中的说明进行操作:
python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel
pip install twine
pip install twine
twine check dist/*
twine check dist/*
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
twine upload dist/*
twine upload dist/*
To save typing your PyPI credentials, create $HOME/.pypirc
with the following contents:为了避免输入 PyPI 凭据,
$HOME/.pypirc
使用以下内容创建$HOME/.pypirc
:
[pypi]
username = <username>
password = <password>
Note: your password will be stored in plain text!
注意:您的密码将以纯文本形式存储!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.