诗歌的默认安装路径是什么

What is the default install path for poetry

我安装了 poetry,但是在尝试调用 poetry 时出现以下错误

zsh: command not found: poetry 

我知道我已经安装了它,因为我在尝试 运行 以下安装脚本时得到以下输出

$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python                                                                             
Retrieving Poetry metadata                                                                                                                                                                    

Latest version already installed.

默认安装位置是~/.poetry/bin/poetry

我将以下内容添加到我的 .zshrc

export PATH=$PATH:$HOME/.poetry/bin

更新official poetry installer新版本:

curl -sSL https://install.python-poetry.org | python3 -

此版本将安装在您的默认 python3 bin 中。例如:$HOME/Library/Python/3.9/bin,安装程序会将位置打印到您的 shell.

添加

export PATH=$HOME/Library/Python/3.9/bin:$PATH

~/.profile~/.zprofile

最初我想 运行 在公寓环境中写诗。 运行宁

    pip install poetry

我看到它是使用本地 Python 安装的,没有链接到 conda 环境。在我的例子中,我添加了

    export PATH="$HOME/.local/bin:$PATH"

到我家目录下.zshrc文件的末尾。

提示:对于 MacOS,您可以使用 Command+Shift+Dot 查看隐藏的文件和文件夹:)