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

進捗ゼロ!2時間の格闘...

0
Last updated at Posted at 2026-01-07

Python3 で FastAPI を import しようとしたが...

1.状況

FastAPI_import_v1.png

なんか黄色い波線が出てきた。動かなくなるエラーではないようだけど...みたいなやつが出たので原因を探ることに。
※実際は緑文字ではなく白文字になっていた。解決した後に無理やり変えたからだろうか。

2.解決方法

素直に "Gemini" に訊いた。

FastAPI_import_v2.png

なるほど!python環境(インタープリタ)が違うのか!というわけでアクティビティバー(?)に「>Python: Select interpreter」を選択して、パスを自分で設定しました。そしたら...

FastAPI_import_v3.png

きれいさっぱり消えました!生成AIってすごいですね。

3.まとめ

初心者の自分からすればどのエラーも学びになるので2時間をかけた価値はあったかなと...(思わないとね)とにかく細かいこともすぐに気になっちゃう性格なので解決したときは気持ちがいい!ではまた。

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