How to Install PSYCOPG2 With Ubuntu PIP


The "Pip" command available on Ubuntu installs Python packages from the Python Package Index, including the Psycopg2 package. Psycopg2 allows Python programs to interface with PostgreSQL databases. Pip installs these packages by downloading their source code and compiling them on your system, so you have to install the compiling utilities and headers for related programs before Pip can install Psycopg2. Install these dependencies, as well as Pip itself, with the "apt-get" command.

  • Click the Ubuntu icon at the top-left corner of the screen, type "Terminal" into the applications search box that appears and press "Enter."

  • Type "sudo apt-get build-dep python-psycopg2 python-pip" into the terminal window and press "Enter" to install the software packages required to compile Psycopg2.

  • Type your password at the password prompt and press "Enter."

  • Type "Y" at the confirmation prompt and press "Enter" to confirm the installation.

  • Type "sudo apt-get install python-pip" into the terminal and press "Enter" to install Pip.

  • Type "sudo pip install psycopg2" into the terminal and press "Enter" to install Psycopg2 with Pip.

Tips & Warnings

  • Click the "Applications" menu, point to "Accessories" and select "Terminal" if you're using an older version of the Ubuntu desktop.

Related Searches


Promoted By Zergnet


Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!