question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RuntimeError] Poetry was not installed with the recommended installer. Cannot update automatically.

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: macOS 10.15.6
  • Poetry version: 1.0.10
  • Link of a Gist with the contents of your pyproject.toml file: Not Applicable

Issue

I installed Poetry using curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python. It installed okay, and every operation is working well. However, poetry self update raises the exception [RuntimeError] Poetry was not installed with the recommended installer. Cannot update automatically. Below is the full traceback (obtained from running it with -vvv:

Traceback (most recent call last):
  File ".../lib/python3.8/site-packages/clikit/console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File ".../lib/python3.8/site-packages/clikit/api/command/command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File ".../lib/python3.8/site-packages/clikit/api/command/command.py", line 171, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File ".../lib/python3.8/site-packages/cleo/commands/command.py", line 92, in wrap_handle
    return self.handle()
  File ".../lib/python3.8/site-packages/poetry/console/commands/self/update.py", line 90, in handle
    self._check_recommended_installation()
  File ".../lib/python3.8/site-packages/poetry/console/commands/self/update.py", line 252, in _check_recommended_installation
    raise RuntimeError(

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ahogencommented, May 6, 2021

I’m on Windows 10 but was seeing this same error after installing with the recommended (Powershell) method, to the default location.

I uninstalled using python ./get-poetry.py --uninstall

Then set the POETRY_HOME environment variable (via the Windows env var editor).

Lastly re-installed using the same script.

poetry self update seems to work now, with the POETRY_HOME env var set.

1reaction
mfogliocommented, Oct 28, 2020

I got just one installed: ❯ which -a poetry /usr/local/bin/poetry Still run poetry update self: ❯ poetry self update

RuntimeError

Poetry was not installed with the recommended installer. Cannot update automatically.


  at /usr/local/Cellar/poetry/1.1.4/libexec/lib/python3.9/site-packages/poetry/console/commands/self/update.py:248 in _check_recommended_installation
      244│         current = Path(__file__)
      245│         try:
      246│             current.relative_to(self.home)
      247│         except ValueError:
    → 248│             raise RuntimeError(
      249│                 "Poetry was not installed with the recommended installer. "
      250│                 "Cannot update automatically."
      251│             )
      252│ 

Also, note I used curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python.

Running on macOS.

Uninstall and reinstalling with the command above works well. But still cannot update poetry (same error).

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Poetry was not installed with the recommended ...
The error message suggests you've probably installed poetry with pip, which does not support automatic poetry updates.
Read more >
Poetry was not installed with the recommended installer ...
The error message suggests you've probably installed poetry with pip, which does not support automatic poetry updates. You should uninstall the poetry ......
Read more >
Poetry not installed using standard way - CircleCI Discuss
It seems that poetry comes installed with CCI python convenience image now. ... Poetry was not installed with the recommended installer.
Read more >
History | Poetry - Python dependency management and ...
Fix an issue where poetry lock --no-update updated dependencies from non-PyPI package sources (#6335). Fix a poetry install performance regression by falling ...
Read more >
Installing the development version of scikit-learn
See instructions for Windows, macOS, Linux and FreeBSD. Build the project with pip in Editable mode: pip install --verbose --no-build-isolation --editable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found