我正在尝试使用twine将一个包发布到PyPi。在项目文件夹中运行twine upload dist/*将显示-bash: twine: command not found。
我在MacOS Mojave上使用Python3.7.7。我已经成功地运行了pip install twine,并且运行pip3 install twine告诉我已经安装了twine。
我已经看到其他答案建议我在我的~/.bash_profile中将安装twine的目录添加到$PATH中。运行pip show -f twine会给我带来:
Name: twine
Version: 3.1.1
Summary: Collection of utilities for publishing packages on PyPI
Home-page: https://twine.readthedocs.io/
Author: Donald Stufft and individual contributors
Author-email: donald@stufft.io
License: UNKNOWN
Location: /Users/Username/Library/Python/3.7/lib/python/site-packages
Requires: requests, importlib-metadata, tqdm, keyring, requests-toolbelt, setuptools, readme-renderer, pkginfo
Required-by:
Files:
../../../bin/twine后面跟着一个文件列表。
根据不同的答案,我已经将/Users/Username/Library/Python/3.7/lib/python/site-packages/bin、/Users/Username/Library/Python/3.7/lib/python/site-packages和/Users/Username/Library/Python/3.7/lib/bin添加到$PATH中,但错误仍然存在。
发布于 2020-06-04 09:42:30
我在$PATH中添加了/Users/Username/Library/Python/3.7/lib/python/bin和/Users/Username/Library/Python/3.7/lib/bin,似乎已经解决了这个问题。
https://stackoverflow.com/questions/62185440
复制相似问题