Can't import MongoClient

后端 未结 11 984
时光取名叫无心
时光取名叫无心 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 22:03

    I would like to suggest more robust answer:

    pip show pymongo
    

    now see where it direct you and from there simply remove the pymongo directory

    rm -rf /pymongo*
    

    Now, you can safely install pymongo again:

    pip install pymongo
    

提交回复
热议问题