LoginSignup
0
1

poetry update が一生終わらない時の対応方法

Posted at
  • poetryで使用するパッケージを変更する際に pyproject.toml を更新してから poetry update を実行すると、パッケージ間の依存関係解決が全然終わらないことがある
  • poetry add しなおすことで解決した

やったこと

  1. pyproject.toml を別名でバックアップする
  2. poetry.lock を削除
  3. pyproject.tomldependencies の記載を削除
    1. [tool.poetry.dependencies] とか [tool.poetry.dev-dependencies] とか
    2. pythonバージョンの記載は残す
  4. バックアップした pyprojejct.toml を参考に poetry add していく
    #例: click = "^7.1.2"
    % poetry add click@^7.1.2
    

まとめ

  • 3時間待っても終わらなかった poetry update が手間はかかりましたが30分程度で代替することができました
  • poetry updateが遅いというissueは本家のgithubでも上がってますが、OSSなので文句は言わずに、寄付するかコミットするか裏技を見つけるかしましょう
0
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
0
1