尝试上传到 PyPi 时出现“-bash: twine: command not found”
"-bash: twine: command not found" when attempting to upload to PyPi
我正在尝试使用 twine
将包发布到 PyPi。 运行 twine upload dist/*
在项目文件夹中给出 -bash: twine: command not found
.
我在 MacOS Mojave 上使用 Python 3.7.7。我已经 运行 pip install twine
成功了,运行ning pip3 install twine
告诉我 twine
已经安装了。
我看到其他答案建议我将安装 twine
的目录添加到 ~/.bash_profile
中的 $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
,根据各种答案,错误仍然存在。
我将 /Users/Username/Library/Python/3.7/lib/python/bin
和 /Users/Username/Library/Python/3.7/lib/bin
添加到 $PATH
,这似乎解决了问题。
我正在尝试使用 twine
将包发布到 PyPi。 运行 twine upload dist/*
在项目文件夹中给出 -bash: twine: command not found
.
我在 MacOS Mojave 上使用 Python 3.7.7。我已经 运行 pip install twine
成功了,运行ning pip3 install twine
告诉我 twine
已经安装了。
我看到其他答案建议我将安装 twine
的目录添加到 ~/.bash_profile
中的 $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
,根据各种答案,错误仍然存在。
我将 /Users/Username/Library/Python/3.7/lib/python/bin
和 /Users/Username/Library/Python/3.7/lib/bin
添加到 $PATH
,这似乎解决了问题。