Hi little frusutriated here, any help would be amazing hi I am using Windows Server 2012 R2 I have installed python 2.7.13
C:\Python27>python -c "import sys; print(sys.version)"
2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]
and
C:\Python27>python -c "import pymongo; print(pymongo.version); print(pymongo.has
_c())"
3.4.0
True
however when I run my code I get
C:\Python27>python C:\Python_scripts\ExcelGenerator.py
Extracting all files from MongoDB
Traceback (most recent call last):
File "C:\Python_scripts\ExcelGenerator.py", line 24, in <module>
from pymongo import MongoClient
File "C:\Python_scripts\pymongo.py", line 8, in <module>
from pymongo import MongoClient
ImportError: cannot import name MongoClient
Ive tried uninstalling pymongo and then uninstalling python then re-installing python then pymongo in that order - ive double checked there are no other versions of python on the computer and still I cant get it to work....
Any ideas?
ps my code is
from pymongo import MongoClient
client = MongoClient('mongodb://xx.x.x.x:xxxxx/')
db = client.the_database
db.authenticate('xxx', 'xxxx', source='xxxx')
coll = db.dataset