When I'm trying to install the requirements for a project with pip install -r requirements.txt
It keeps failing with the following output.
[sarthak@envy cyc1eon]$ pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting asgiref==3.2.10
  Downloading asgiref-3.2.10-py3-none-any.whl (19 kB)
Collecting dj-database-url==0.5.0
  Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
Collecting Django==3.0.8
  Downloading Django-3.0.8-py3-none-any.whl (7.5 MB)
     |████████████████████████████████| 7.5 MB 2.6 MB/s 
Collecting django-heroku==0.3.1
  Downloading django_heroku-0.3.1-py2.py3-none-any.whl (6.2 kB)
Collecting gunicorn==20.0.4
  Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
     |████████████████████████████████| 77 kB 5.5 MB/s 
Requirement already satisfied: setuptools>=3.0 in /usr/lib/python3.9/site-packages (from gunicorn==20.0.4->-r requirements.txt (line 5)) (54.2.0)
Collecting psycopg2==2.8.5
  Downloading psycopg2-2.8.5.tar.gz (380 kB)
     |████████████████████████████████| 380 kB 9.7 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lc8h8hyn/psycopg2_4a4c96a147204fd489df1a2f7201063a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lc8h8hyn/psycopg2_4a4c96a147204fd489df1a2f7201063a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ztzh9r6w
         cwd: /tmp/pip-install-lc8h8hyn/psycopg2_4a4c96a147204fd489df1a2f7201063a/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info
    writing /tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info/SOURCES.txt'
    
    Error: pg_config executable not found.
    
    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:
    
        python setup.py build_ext --pg-config /path/to/pg_config build ...
    
    or with the pg_config option in 'setup.cfg'.
    
    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.
    
    For further information please check the 'doc/src/install.rst' file (also at
    <https://www.psycopg.org/docs/install.html>).
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The requirements for the project are
asgiref==3.2.10
dj-database-url==0.5.0
Django==3.0.8
django-heroku==0.3.1
gunicorn==20.0.4
psycopg2==2.8.5
psycopg2-binary==2.8.5
python-decouple==3.3
pytz==2020.1
sqlparse==0.3.1
whitenoise==5.1.0
 
     
    