>>> import pymongo
>>> conn = pymongo.Connection("localhost",27017)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Connection'
难道pymongo3.0没有这个函数了?
配置MongoDB正常,开了bin里的mongod和mongo环境
pip装的 pymongo3.0
头文件导入正常
现在只能暂时用
client = MongoClient("localhost",27017)
代替,其他正常
有没有人和我一样情况的?
>>> conn = pymongo.Connection("localhost",27017)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Connection'
难道pymongo3.0没有这个函数了?
配置MongoDB正常,开了bin里的mongod和mongo环境
pip装的 pymongo3.0
头文件导入正常
现在只能暂时用
client = MongoClient("localhost",27017)
代替,其他正常
有没有人和我一样情况的?