我正在尝试使用twine将我的包上载到PyPI。 我跟踪了 official documentation 我在这一步停了下来: twine upload dist/* 我之前的任何步骤都没有错误,我一直在使用python3而不是python(因此之前的所有步骤都使用python3或pip3)
twine upload dist/*
$ twine upload dist/* Invalid command: upload $ which twine /usr/local/bin/twine $ twine --version Twine version 1.0.1 $ which python3 /usr/local/bin/python3
结果发现我安装了不同的绳线, this one ,导致错误。如何卸下当前安装的捆绳并安装正确的PyPi捆绳?
更新1 我已删除另一版本的twine。我跑了 pip3 install twine 它给出了许多已经满足的要求: twine in /Users/..... 但如果我跑 twine --version 我明白了 -bash: twine: command not found
pip3 install twine
twine in /Users/.....
twine --version
-bash: twine: command not found
您的$路径中是否有其他匹配项 twine ,所以它可能使用此绳线而不是PyPi绳线?
twine
$路径从头到尾搜索,并运行第一个匹配的可执行文件。因此$PATH开头的目录优先于后面的目录。