2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Python】VS Codeで外部ライブラリのimport時にModuleNotFoundErrorが出るときの解決法

Last updated at Posted at 2025-05-03

VS Codeのメニュー
Code > 基本設定 > 設定 を選択
スクリーンショット 2025-05-03 17.50.19.png

表示されたタブの「設定の検索」欄に「extra path」と入力。
表示された中から「Python › Analysis: Extra Paths」の「項目追加」を押下して以下を追加する。

/Users/{ユーザー名}/.pyenv/versions/**/lib/**/site-packages

スクリーンショット 2025-05-03 17.50.25.png

pyenvのバージョンを追加しても、これなら追加で設定しなくてもOK。

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?