1

我正在尝试使用twine. twine upload dist/*在项目文件夹中运行会给出-bash: twine: command not found.

我在 MacOS Mojave 上使用 Python 3.7.7。我已经pip install twine成功运行,运行pip3 install twine告诉我twine已经安装了。

我已经看到其他答案建议我将twine安装目录添加到$PATH我的~/.bash_profile. 跑步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

4

1 回答 1

1

我在 , 中添加了/Users/Username/Library/Python/3.7/lib/python/bin和,这似乎解决了问题。/Users/Username/Library/Python/3.7/lib/bin$PATH

于 2020-06-04T01:42:29.537 回答