Python | 問題解決 | ‘Import “rest_framework” could not be resolved’

pipenvを利用してDjangoの環境構築し,その後,djangorestframeworkをインストールした.pyファイルにて"from rest_framework"を利用した際,以下エラーが発生した.

上記エラーの解決方法をこちらの記事にて記す.
実施環境
各バージョンの確認方法はこちら
OS: Windows11
Python 3.11.1
pipenv version 2022.11.30
問題解決方法
VS Codeを開き,フォルダとpyファイルを開くと以下のようなエラーメッセージが出現する.

“ctrl+shift+P"を同時にクリックし,コマンドパレットを開き,"Python: Select Interpreter"を選択する.

以下のように,プロジェクトフォルダごとのPython Interpreterが表示される.今回開いているプロジェクトフォルダが表示されている箇所を選択する.

以下が今回開いているプロジェクトフォルダのPython Interpreterを検索できたので,選択する.

以下のように,エラーが解消された.

以上