Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-YYFUnW/psycopg2/

Tags:

django

I'm trying to install requirements.txt file in python 2.7 in ubuntu but i get ERROR:

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-YYFUnW/psycopg2/

What exactly does that mean, and how do I fix it? I already tried these commands:

apt-get install python-bs4
sudo install --upgrade setuptools
sudo apt-get update

Error Image :

Error image

like image 925
Prabina Avatar asked Jul 01 '19 05:07

Prabina


1 Answers

This error can occur because of the version of psycopg2==2.6.2 you are trying to install. I did face this error while installing this version of psycopg2. So to avoid this error, you can use another version of it or the latest version as:

pip install psycopg2

Also, psycopg2 is going to be renamed from release of version 2.8, so it is recommended to install it using:

pip install psycopg2-binary 

If you are installing psycopg2 from a requirements.txt file, you can comment out the package listed in the file as:

# psycopg2==2.6.2

Then install the package as suggested above, then install other requirements from the file with the package name still commented.

like image 141
Sanip Avatar answered Nov 07 '22 16:11

Sanip