0

hellow everyone, i tried to install PyMongo package with pip( i hope that is the way to do it). [its a part of a login system]

my command line was:

C:/Python36/Scripts/pip install PyMongo

But, when i put it in the command line i got

the system cannot find the file specificied.

And the import line in the code was:

from flask_pymongo import PyMongo

Do someone knows what should i do? Thanks!!

2 Answers2

0

Flask-PyMongo is a different package than PyMongo. It looks like you've only installed PyMongo, but are trying to use Flask-PyMongo in your application. You should run C:/Python36/Scripts/pip install Flask-PyMongo to install Flask-PyMongo.

dcrosta
  • 26,009
  • 8
  • 71
  • 83
0

You installed PyMongo and tried to import PyMongo from flask_pymongo.

PyMongo is a package to work with MongoDB. To make this work more efficient, Flask just made an extension named "Flask-PyMongo". So, we can directly import "Flask-PyMongo" and start working with MongoDB in a very efficient way.

You can think "Flask-PyMongo" as a wrapper of "PyMongo".

grooveplex
  • 2,492
  • 4
  • 28
  • 30
Aqurds
  • 19
  • 1
  • 5