我正在尝试使用twine在pypi上发布我的第一个python包(当然,首先会添加到test-pypi上)。
我遵循了关于https://packaging.python.org/tutorials/packaging-projects/的官方指南。
但由于某种原因,没有找到或没有正确安装麻绳。
我用以下方法安装了麻绳:
pip install twine"pip“说,pip上安装了麻绳。
在我升级了捻线和其他东西之后,当我试图逃跑时:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*然后它说根本找不到麻绳:
-bash: twine: command not found . 我的系统是mac (高塞拉),我使用conda的python2.7。Pip还被配置为conda python:
>>pip -V
>>pip 10.0.1 from /anaconda2/lib/python2.7/site-packages/pip (python 2.7)我很感谢你的帮助。
发布于 2018-12-26 02:51:15
使用python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
发布于 2019-01-04 18:14:12
基于@hoefling评论运行
pip show twine它将列出属于twine包的所有文件。它将输出如下内容:
名称: twine版本: 1.12.1摘要:在/Users/hakuna.matata/.local/lib/python3.6/site-packages主页上发布软件包的实用程序集- https://twine.readthedocs.io/作者: donald@stufft.io和个人贡献者作者-电子邮件:donald@stufft.io许可证:donald@stufft.io许可,2.0版本位置:https://twine.readthedocs.io/Required: pkginfo,renderer,tqdm,请求,请求-工具箱,所需的setuptools:
注意Files下的第一个文件,即../../../bin/twine和Location: /Users/hakuna.matata/.local/lib/python3.6/site-packages。当然,您的用户名将取代“hakuna.matata”
这将导致在/Users/hakuna.matata/.local/bin上打包可执行文件的路径,您可以将其作为export PATH="/Users/hakuna.matata/.local/bin:$PATH"添加到您的.bash_profile中。
然后,重新启动终端或
source ~/.bash_profile发布于 2022-11-28 16:30:02
运行以下命令:
python -m twine upload dist/*https://stackoverflow.com/questions/51451966
复制相似问题