pymongo.errors.ConfigurationError: Server at 10.2.6.31:27017 reports wire version 5, but this versio

时间:2022-11-01 11:23:04

编写python3连接mongodb3.4的脚本报以下错误:

pymongo.errors.ConfigurationError: Server at 10.2.6.31:27017 reports wire version 5, but this version of PyMongo requires at least 6 (MongoDB 3.6).

pymongo.errors.ConfigurationError: Server at 10.2.6.31:27017 reports wire version 5, but this versio

由于使用 pip3 install pymongo 命令默认安装的是支持mongodb3.6及以上版本的驱动,现需要降级到3.4,命令如下:

pip3 install pymongo==3.4

pymongo.errors.ConfigurationError: Server at 10.2.6.31:27017 reports wire version 5, but this versio

问题解决。