ImportError: No module named psycopg2
centos, centos5, odoo, python
Solution
Step 1: Install the dependencies
sudo apt-get install build-dep python-psycopg2
Step 2: Run this command in your virtualenv
pip install psycopg2-binary
Ref: Fernando Munoz
Problem
In installation process of OpenERP 6, I want to generate a config file with these commands: ``` cd /home/openerp/openerp-server/bin/ ``` ``` ./openerp-server.py -s --stop-after-init -c /home/openerp/openerp-server.cfg ``` But it always showed the message: `ImportError: No module named psycopg2` When I checked for psycopg2 package, it's already installed. Package `python-psycopg2-2.4.5-1.rhel5.x86_64` is already installed to its latest version. Nothing to do. What's wrong with this? My server is CentOS, I've installed Python 2.6.7.