Can't import MongoClient

后端 未结 11 982
时光取名叫无心
时光取名叫无心 2021-01-01 21:18

I am unable to do this:

from pymongo import MongoClient

I get:

>>> import pymongo
>>> from pymongo import         


        
11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 21:59

    According to docs, MongoClient was introduced in version 2.4. As you installed pymongo from your distribution repository, it's quite possible it's not the most recent version. Try installing it via PiP (remove the one you have installed first):

    pip install pymongo
    

提交回复
热议问题