First, enter pip3 show flask
in the terminal. It will display something like this:
Name: Flask
Version: 2.2.2
Summary: A simple framework for building complex web applications.
Home-page: https://palletsprojects.com/p/flask
Author: Armin Ronacher
Author-email: armin.ronacher@active-4.com
License: BSD-3-Clause
Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
Requires: click, importlib-metadata, itsdangerous, Jinja2, Werkzeug
Required-by:
If the location says /Versions/3.7/
(maybe yours is different from mine), it means you added the package in Python 3.7 (maybe yours and mine are different). Remember the Python version, you will need it later.
Then, click ⌘ + ⇧ + P . After that, select Python: Select Interpreter
. Then, choose the Python version where you added the package. The error may go away (mine went away).