import tensorflow as tf
と記述すると上記のようなメッセージが表示されます。
Import "tensorflow" could not be resolved (PylancereportMissingImports)
試したこと
ターミナル(コマンドプロンプト)で pip install tensorflow
を実行し、pip show tensorflow
で仮想環境へのインストールへの確認は取れました。
pip show tensorflow
の実行結果
Name: tensorflow
Version: 2.10.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: [email protected]
License: Apache 2.0
Location: c:\users\katou\anaconda4\lib\site-packages
Requires: absl-py, astunparse, flatbuffers, gast, google-pasta, grpcio, h5py, keras, keras-preprocessing, libclang, numpy, opt-einsum, packaging, protobuf, setuptools, six, tensorboard, tensorflow-estimator, tensorflow-io-gcs-filesystem, termcolor, typing-extensions, wrapt
Required-by:
その後、再起動しましたが状況は改善されません。インタプリタはPython 3.10.4 64-bitを選択しています。
プログラムを実行した際のエラーメッセージはこちらです。
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
VSCodeをアンインストールし、再インストールすることを検討していますが何か解決策に心当たりある方いらっしゃいますでしょうか?
また、下に示すのは現在のVSCodeの画面です。また、下記のsetting.jsonではAnacondaの保存場所が恐らく実際のものと異なる場所で保存されているのですが、こちらは関係ありますでしょうか?知見のある方ご助言お願い致します。