How to resolve error: Poetry was not installed with the recommended installer. Cannot update automatically

Viewed 821

I installed poetry using on mac using: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - several months ago.

When I run poetry self update -v I see the following error:

[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(

This error has been there since installation. I never found a solution. If it helps, I have Poetry version 1.0.5 installed, and when I run which -a poetry I get /Library/Frameworks/Python.framework/Versions/3.8/bin/poetry

1 Answers

simply add POETRY_HOME to your global env will solve this problem

e.g. in linux, add this line to your .profile

export POETRY_HOME="$HOME/.poetry/bin"
Related