How to fix error ERROR Command errored out with exit status 1 python when trying to install django-heroku using pip

0 votes

I wanted to install django-heroku using pip. But I keep getting this error. I have checked my Python version in Heroku is up to date.



ERROR: Command errored out with exit status 1:
command: /Users/user/Dev/trydjango/new_env/bin/python -c 'import
sys, setuptools, tokenize; sys.argv[0] =
'"'"'/private/var/folders/xl/s533dc515qs8sd3tpg7y5ty80000gp/T/pip-
install-xqsix26g/psycopg2/setup.py'"'"';

egg_info --egg-base pip-egg-info
     cwd:
/private/var/folders/xl/s533dc515qs8sd3tpg7y5ty80000gp/T/pip-
install-xqsix26g/psycopg2/
Complete output (23 lines):
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/psycopg2.egg-
info/dependency_links.txt
writing top-level names to pip-egg-info/psycopg2.egg-
info/top_level.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  Please add t .   he 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.


----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py
egg_info Check the logs for full command output.


Any solutions will be gladly appreciated.

Apr 26, 2022 in Python by Kichu
• 19,040 points
7,680 views

1 answer to this question.

0 votes

Just add the package containing the executable pg_config. And you will be good to go. For more info you can refer: pg_config executable not found.

I hope this helps.

answered Apr 28, 2022 by narikkadan
• 63,600 points

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

how to download and install Django rest framework?

To install Django, you can simply open ...READ MORE

answered Apr 24, 2018 in Python by Christine
• 15,790 points
1,969 views
0 votes
1 answer
0 votes
1 answer

How to urlencode a querystring in Python?

Just pass your parameters into urlencode() like: >>> import urllib >>> ...READ MORE

answered Apr 28, 2022 in Python by narikkadan
• 63,600 points
636 views
0 votes
1 answer

Python: Could not install packages due to an OSError: [Errno 2] No such file or directory

I also met with the same problem ...READ MORE

answered Apr 28, 2022 in Python by narikkadan
• 63,600 points
39,178 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP