April 12, 2020last updated June 14, 2023latest commit 4f8434d Jupyter Notebook内で実行したコードに,Poetryでインストールしたモジュールをインポートする記述があると,ModuleNotFoundError というエラーが発生します. 原因は,システムにインストールされているJupyterが使っているPythonカーネルからはPoetryプロジェクトのvenvが参照できないことです. これを解決するために,JupyterにPoetryが生成したvenvのカーネルを追加します.はじめに ipykernel モジュールをプロジェクトに追加します. poetry add --dev ipykernel poetry shell などで仮想環境に入ったのちに,次のコマンドを実行することでvenvのカーネルをJupyte