gpt4 book ai didi

python - 将 Python 包上传到 PyPI

转载 作者:行者123 更新时间:2023-12-01 06:33:32 24 4
gpt4 key购买 nike

我按照下面 PyPI 链接中的说明将我的 Python 包上传到 PyPI: https://packaging.python.org/tutorials/packaging-projects/

但是我被困在安装后需要运行 twine 的步骤,即下面的步骤:

安装后,运行 Twine 上传 dist 下的所有文件:

python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

当我在命令提示符中运行上述命令时(我在 Windows 中使用 cmd),我收到以下消息:

'twine' is not recognized as an internal or external command, operable program or batch file.

我做错了什么?安装 twine 后,我是否需要从 pip 安装 twine 的目录更改目录到 dist/* 文件夹所在的目录?或者我不知何故没有正确安装麻线? (当我安装 twine 时,我确实收到了一些警告消息,但它确实说 twine 最后已成功安装 - 我已在此处附加了警告消息的图像)。

twine_issues

最佳答案

是的,问题是警告:tine 没有安装在 Python 可以找到的地方。省略 --user 标志可能会解决此问题,或者按照建议编辑 PATH

关于python - 将 Python 包上传到 PyPI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59781094/

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