Open In App

How to Install Python-PyGreSQL on Ubuntu?

Last Updated : 31 Jan, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Python-PyGreSQL is a python module that interfaces to the popular PostgreSQL database. Python-PyGreSQL implants the PostgreSQL database query library to permit simple use of the powerful PostgreSQL features from Python script. In this, article, we will look into the steps of installing the Python-PyGreSQL Library on the Linux Operating System.

Requirements:

Installing Python-PyGreSQL package on Linux using PIP

To install the Python-PyGreSQL package in Linux we have to follow the following steps:

Step 1: First of all, we will install Python3 on our Linux Machine. Use the following command in the terminal to install Python3.

sudo apt-get install python3

Install-Python3

Step 2: Now, install the pip module which is required to install the packages in Python3. So we use the following command for installation:

sudo apt install python3-pip

Install-the-pip-module

Step 3: Now, update the system by using the following command to avoid getting errors during the installation process.

sudo apt-get update

Updating-the-system

Step 4: Now, install the PyGreSQL package by using the following command.

sudo apt-get install python3-pygresql

Install-the-PyGreSQL-package

Verifying Python-PyGreSQL package Installation on Linux using PIP

To verify if the Python-PyGreSQL package has been successfully installed in your system run the below command in Terminal:

python3 -m pip show pygresql

You’ll get the below message if the installation is complete:

Verifying-Python-PyGreSQL-package-Installation


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads