0

With:

from flask_pymongo import PyMongo

Why am i getting:

ModuleNotFoundError : No module named 'flask_pymongo'

Why am i getting modulenotfounderror : No module named 'flask_pymongo'?

I have installed both flask and flask-pymongo on my system using pip3 from the VS Code terminal. why am i still getting this error?

I reinstalled both modules multiple times but couldn't resolve the issue.

rickhg12hs
  • 10,638
  • 6
  • 24
  • 42
  • Perhaps if you showed the code that generates the error, how you installed `Flask-PyMongo`, and how you are running your app, someone may be able to offer some suggestions. – rickhg12hs Jul 07 '23 at 19:29
  • how you installed ? – Monty Python Jul 09 '23 at 06:35
  • from flask_pymongo import PyMongo . this is the line which is showing error. And i installed Flask-PyMongo from vs code terminal by running the pip3 command. @rickhg12hs – Anurag Kumar Jul 09 '23 at 17:22
  • I'm guessing you are running your code from within VS Code and it is using a different `python`, or within a virtual environment, than the `python`/environment that installs the modules from the VS Code terminal. Check your `python`s and virtual environments. – rickhg12hs Jul 09 '23 at 23:29

0 Answers0