heroku / django-heroku

[DEPRECATED] Do not use! See https://github.com/heroku/django-heroku/issues/56
BSD 3-Clause "New" or "Revised" License
459 stars 142 forks source link

cannot install because of psycopg2 requirement #48

Open alexzaitsev opened 5 years ago

alexzaitsev commented 5 years ago

I cannot install django-heroku because of psycopg2 requirement. But psycopg2-binary is already installed..

(env) p3ngu1ns-MacBook-Pro:bin p3ngu1n$ ./python pip install psycopg2-binary
Requirement already satisfied: psycopg2-binary in /Users/p3ngu1n/Documents/Develop/python/tutorials/producthuntclone/env/lib/python3.7/site-packages (2.8.3)
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

(env) p3ngu1ns-MacBook-Pro:bin p3ngu1n$ ./python pip install django-heroku
Collecting django-heroku
  Using cached https://files.pythonhosted.org/packages/59/af/5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6/django_heroku-0.3.1-py2.py3-none-any.whl
Collecting psycopg2 (from django-heroku)
  Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
    Complete output from command python setup.py egg_info:
    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 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
    <http://initd.org/psycopg/docs/install.html>).

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/lh/t8sygs3s7ld19xncfzlymtb40000gn/T/pip-install-xngbqf6n/psycopg2/
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
wisnuprama commented 5 years ago

Me too, I don't have postgres installed on my local system and use postgres from somewhere else.

masato-io commented 5 years ago

I'm facing the same issue as well.

wisnuprama commented 5 years ago

@masato-io @alexzaitsev if you use Ubuntu, you can install llibpq-dev to solve this problem. I'm running latest linux mint.

sudo apt install libpq-dev
jaleel27 commented 5 years ago

thanks wisnuprama. it worked

OldMetalmind commented 4 years ago

I'm having the same problem but working on a MacOS

dawit-nigusu commented 4 years ago

@masato-io @alexzaitsev if you use Ubuntu, you can install llibpq-dev to solve this problem. I'm running latest linux mint.

sudo apt install libpq-dev

thanks , It worked for me

Cabalist commented 4 years ago

It be great if psycopg2-binary was an option.

chaweewatp commented 4 years ago

Can anyone explain how to fix this?