[Answered ]-BSON functions affecting performance – installation dependent

2👍

This is solved by compiling PyMongo with C extensions. The MacOS binary comes with these extensions automatically compiled in, Linux installations won’t have them installed if dependencies aren’t met.

Details are here.

In short – install the dependencies:

On Debian:

sudo apt-get install build-essential python-dev

On RedHat:

sudo yum install gcc python-devel

Then reinstall PyMongo with:

pip install --upgrade pymongo

and enjoy the performance improvements.

👤Laizer

Leave a comment