Installing the psycopg2 Python Package

Hue in Runtime 7 requires version 2.7.5 or higher of the psycopg2 Python package for connecting to a PostgreSQL database. The psycopg2 package is automatically installed as a dependency of Cloudera Manager Agent, but the version installed is often lower than 2.7.5.

If you are installing Runtime 7 and using PostgreSQL for the Hue database, you must install psycopg2 2.7.5 or higher on all Hue hosts as follows. These examples install version 2.7.5:

RHEL 7 Compatible
  1. Install the python-pip package:
    sudo yum install python-pip
  2. Install psycopg2 2.7.5 using pip:
    sudo pip install psycopg2==2.7.5 --ignore-installed
Ubuntu
  1. Install the python-pip package:
    sudo apt-get install python-pip
  2. Install psycopg2 2.7.5 using pip:
    sudo pip install psycopg2==2.7.5 --ignore-installed
SLES 12
Install the python-psycopg2 package:
sudo zypper install python-psycopg2