close

[Solved] ERROR: Failed building wheel for psycopg2 (Ubuntu 20.04 + Python 3.8.5 + venv)

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ERROR: Failed building wheel for psycopg2 (Ubuntu 20.04 + Python 3.8.5 + venv) in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ERROR: Failed building wheel for psycopg2 (Ubuntu 20.04 + Python 3.8.5 + venv) Error Occurs?

Today I get the following error ERROR: Failed building wheel for psycopg2 (Ubuntu 20.04 + Python 3.8.5 + venv) in Python.

How To Solve ERROR: Failed building wheel for psycopg2 (Ubuntu 20.04 + Python 3.8.5 + venv) Error ?

  1. How To Solve ERROR: Failed building wheel for psycopg2 (Ubuntu 20.04 + Python 3.8.5 + venv) Error ?

    To Solve ERROR: Failed building wheel for psycopg2 (Ubuntu 20.04 + Python 3.8.5 + venv) Error pip install libpq-dev should work or perhaps a specific version may be required. About psycopg2 being commented yet it being attempted to install by pip it may be a requirement of one of your other dependencies.

Solution 1

Instead pip command use:

sudo apt-get install libpq-dev

then use:

pip install psycopg2

Solution 2

Looks like you need to install libpq-dev according to this Problems compiling and installing psycopg2.
pip install libpq-dev should work or perhaps a specific version may be required. About psycopg2 being commented yet it being attempted to install by pip it may be a requirement of one of your other dependencies.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment