Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know which version of PyMongo is running on my project

I'm developing a python project, in the requirements file I have three different types of PyMongo

Flask-PyMongo==0.3.1
pymongo==2.7
flask-mongoengine==0.7.1

How can I define which version I'm using?

like image 477
Babel Avatar asked Aug 26 '15 08:08

Babel


3 Answers

If you got pip installed, you can try this in terminal:

$ pip freeze | grep pymongo
pymongo==3.0.2
like image 158
Kane Blueriver Avatar answered Oct 19 '22 04:10

Kane Blueriver


You can learn like this,

>>> import pymongo
>>> pymongo.version
'3.0.3'
like image 20
Adem Öztaş Avatar answered Oct 19 '22 03:10

Adem Öztaş


This should work

python -c 'import pymongo; print (pymongo.__version__)'
like image 6
Charan Avatar answered Oct 19 '22 04:10

Charan