Tutorial: Installing and configuring PosgreSQL and psycopg2 on MAC OX 10

Assume you want to write Python program, which using PostgreSQL database and you have your shiny MAC with MAC OS X (Lion, Maverics or Yosemite).

There is several ways to perform such task.

  1. Use virtualized environment (for example Linux on VirtualBox or on Docker containers)
  2. Use native applications for Mac OS X.

First approach is preferred for production development.

Second approach is good for playground and simpler in configuration.

This tutorial will cover second approach – Native applications for MAC OS X.

So, let’s start.

Step 1. Install Postggres.app

Go to http://postgresapp.com and download zip package with postgres app.

Assume you download zip package to Downloads folder.

Unzip zip package and run Postgreas application from Downloads folder.

Following window appear.

Press “Move” and your Postgres.app will move to Applications folder and following window appears:

If you click “Open psql”, terminal window opens and you will be able to configure PostgreSQL via terminal.

var Person = function(name, age) {
  this.name = name;
  this.age = age;


Request a quote