“-bash:麻线:未找到命令”,尝试上传到PyPi时

问题描述 投票:0回答:1

我正在尝试使用twine将软件包发布到PyPi。在项目文件夹中运行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: [email protected]
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,根据各种答案,错误仍然存​​在。

python bash pip pypi twine
1个回答
0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.