pymongo - mongodb+srv “dnspython must be installed” error

后端 未结 7 2141
再見小時候
再見小時候 2020-12-28 13:35

I am trying to connect MongoDB from Atlas But I encountered:

dnspython must be installed error

My mongo uri (mo

7条回答
  •  太阳男子
    2020-12-28 13:56

    In order to use mongo+srv protocol, you need to install pymongo-srv Launch this command to do it with python 3:

    pip3 install pymongo[srv]
    

    or this one for other versions:

    pip install pymongo[srv]
    

    And as @lukrebs suggested, for ZSH, add quotes:

    pip3 install 'pymongo[srv]'
    

提交回复
热议问题