Do be very sure that in your virtual environment, you have run:
$ pip install flask
at some point. If you have not, then typing “flask run” will run the system-wide flask (in /bin) which uses the system-wide Python installation (without pymongo installed), not your venv at all.