LoginSignup
1
1

More than 3 years have passed since last update.

Poetry0.12.0へのアップグレードに失敗した

Last updated at Posted at 2019-09-26

Poetryがなにもしていないのに壊れた。
結論から言うと再インストールしたら直ります。

pip uninstall poetry
pip install poetry

エラー内容

$ poetry -V
Traceback (most recent call last):
  File "/usr/local/bin/poetry", line 6, in <module>
    from poetry.console import main
  File "/usr/local/lib/python3.7/site-packages/poetry/console/__init__.py", line 1, in <module>
    from .application import Application
  File "/usr/local/lib/python3.7/site-packages/poetry/console/application.py", line 7, in <module>
    from cleo.formatters import Formatter
ModuleNotFoundError: No module named 'cleo.formatters'

原因

Poetryは 0.11.5から0.12.0にアップグレードできない。
どこかで0.11.5からアップグレートを実行してしまったため、壊れてしまった。
リリースノートにできないという有無が記載されている
https://poetry.eustace.io/blog/poetry-0-12-0-is-out.html

It is not possible to use the self:update command to upgrade Poetry from 0.11.5 to 0.12. Use the installer to upgrade.

参考

エラーメッセージで検索すると下記のissueがヒットし解決しました
https://github.com/sdispater/poetry/issues/553

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1