我使用user标志安装了twine (根据文档,用户方案):
pip install --user twine
但我不能把它当做命令。例如,如果我这样做了:
twine --version
它给了我(这是显而易见的):
-bash: twine: command not found
我读了this类似的帖子,但找不到任何满意的答案(答案不被接受)。
我知道我可以使用:
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
根据其中一个答案。
但是,我的问题是,为什么它没有出现?
我检查了twine setup.py
,发现它使用了entry_points
(这有助于设置twine command
)。在我的假设中,setup.py
会被忽略,因为它在安装(或下载软件包)期间使用wheel
而不是sdist
进行pip
。
https://stackoverflow.com/questions/56366277
复制相似问题