Installing most Python libraries requires you to open your console and type:
pip install psycopg2
If that doesn't work, and you are using an Anaconda Python distribution, you can run the conda command, using:
conda install -c anaconda psycopg2
While most Python libraries can be downloaded and installed using:
python setup.py install
Since psycopg2 is more advanced than that and requires you to have a C compiler, Python header files, libpq header files, and the pg_config program. If you need to install psycopg2 from the source, the link to the instructions is in the following hint box.