Ray*_*der 6 python python-poetry
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -几个月前,我在 mac 上使用安装了诗歌:
当我运行时,poetry self update -v我看到以下错误:
[RuntimeError]
Poetry was not installed with the recommended installer. Cannot update automatically.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/poetry/console/commands/self/update.py", line 64, in handle
raise RuntimeError(
Run Code Online (Sandbox Code Playgroud)
自安装以来,此错误一直存在。我一直没有找到解决办法。如果有帮助,我安装了 Poetry 1.0.5 版,当我运行时,which -a poetry我得到/Library/Frameworks/Python.framework/Versions/3.8/bin/poetry
只需将 POETRY_HOME 添加到您的全局环境中即可解决此问题
例如,在 Linux 中,将此行添加到您的 .profile 中
export POETRY_HOME="$HOME/.poetry/bin"
Run Code Online (Sandbox Code Playgroud)