Since you did not specify that you need to use the standard CentOS Python installation, I highly recommend using virtualenv to get the necessary support. CentOS requires an older version of Python, and we must work with it in my business.
Take the latest Python and create it from the source code. Make sure the SSL devel libraries are installed through Yum.
./configure --prefix=/home/user/custompython make && make install
Take virtualenv.py from https://raw.github.com/pypa/virtualenv/master/virtualenv.py and run this script from your custom python installation
/home/user/custompython/bin/python virtualenv.py -P /home/user/custompython/bin/python /home/user/pythonENV export PYTHON_HOME=/home/user/pythonENV/ export PATH=/home/user/pythonENV/bin/:$PATH pip install pymongo
Of course, adding path changes to .bashrc is useful. Now you can install whatever you want without worrying about the very old version 2.4.3 that comes with CentOS. This is the exact setup I have on our CentOS 5.8 system, and it is very useful.
source share