Re: Could you please help to advise this if you can? Thanks.

From: Dave Page <dpage(at)pgadmin(dot)org>
To: vanbell <vanbell(at)126(dot)com>
Cc: "lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: Could you please help to advise this if you can? Thanks.
Date: 2019-04-11 09:10:18
Message-ID: CA+OCxoy5OjTbEuV71aOMsu=iviBrWo_rHKMHwdQUpD9VAvqBVA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Thu, Apr 11, 2019 at 9:54 AM Dave Page <dpage(at)pgadmin(dot)org> wrote:

>
>
> On Thu, Apr 11, 2019 at 9:42 AM vanbell <vanbell(at)126(dot)com> wrote:
>
>> Hi Team,
>>
>> I know this would out of your scope.
>> May I ask your help if you know any thing of this?
>> Could you please help to advise for below error if you can?
>> (I tried to install one pgadmin4 in one virtual env)
>> Thanks so much.
>>
>
> Yes, it's a change in psycopg2 that's been annoying me for a little while.
> I'm trying to come up with a good workaround for pgAdmin.
>
> In the meantime, either:
>
> - Run 'pip install psycopg2-binary' in your virtualenv before trying to
> install pgAdmin, or;
> - Install PostgreSQL on the machine, and ensure the pg_config binary is in
> your path before installing pgAdmin.
>
> The former is likely a lot easier.
>

Actually, I just had an idea on how to fix this. Patch committed for 4.6:
https://redmine.postgresql.org/issues/4165

>
>
>>
>> (Pgadmin4-4.5) [root(at)oc0274005686 Pgadmin4-4.5]# pip install
>> pgadmin4-4.5-py2.py3-none-any.whl
>> DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
>> 2020. Please upgrade your Python as Python 2.7 won't be maintained after
>> that date. A future version of pip will drop support for Python 2.7.
>> Processing ./pgadmin4-4.5-py2.py3-none-any.whl
>> Collecting python-dateutil>=2.8.0 (from pgadmin4==4.5)
>> Using cached
>> https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
>> Collecting Flask-Paranoid==0.2.0 (from pgadmin4==4.5)
>> Using cached
>> https://files.pythonhosted.org/packages/0e/14/359033a218c5403872e11ff7267e6c638c0279067fa932d93653188f4052/Flask_Paranoid-0.2.0-py2.py3-none-any.whl
>> Collecting blinker==1.4 (from pgadmin4==4.5)
>> Using cached
>> https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz
>> Collecting pytz==2018.9 (from pgadmin4==4.5)
>> Using cached
>> https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl
>> Collecting Flask-WTF==0.14.2 (from pgadmin4==4.5)
>> Using cached
>> https://files.pythonhosted.org/packages/60/3a/58c629472d10539ae5167dc7c1fecfa95dd7d0b7864623931e3776438a24/Flask_WTF-0.14.2-py2.py3-none-any.whl
>> Collecting Flask-HTMLmin==1.5.0 (from pgadmin4==4.5)
>> Using cached
>> https://files.pythonhosted.org/packages/c2/1e/b649bc15774cedd07509e5fd830fbfd7470adc93dffda607dd02262deb29/Flask-HTMLmin-1.5.0.tar.gz
>> Collecting psycopg2>=2.8 (from pgadmin4==4.5)
>> Using cached
>> https://files.pythonhosted.org/packages/52/be/f898e712f5f08131d651a62754fca82a1deb42e4e9889ad01932f770a2be/psycopg2-2.8.1.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 top-level names to
>> pip-egg-info/psycopg2.egg-info/top_level.txt
>> writing dependency_links to
>> pip-egg-info/psycopg2.egg-info/dependency_links.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
>> /tmp/pip-install-KTnqtM/psycopg2/
>>
>> (Pgadmin4-4.5) [root(at)oc0274005686 Pgadmin4-4.5]# pip install
>> psycopg2-binary
>> DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
>> 2020. Please upgrade your Python as Python 2.7 won't be maintained after
>> that date. A future version of pip will drop support for Python 2.7.
>> Requirement already satisfied: psycopg2-binary in
>> /root/.local/share/virtualenvs/Pgadmin4-4.5-uPL5RCS3/lib/python2.7/site-packages
>> (2.8.1)
>> (Pgadmin4-4.5) [root(at)oc0274005686 Pgadmin4-4.5]# yum install
>> postgresql-devel*
>>
>>
>> Package postgresql10-devel-10.7-2PGDG.rhel7.x86_64 already installed and
>> latest version
>> Package postgresql11-devel-11.2-2PGDG.rhel7.x86_64 already installed and
>> latest version
>> Nothing to do
>> (Pgadmin4-4.5) [root(at)oc0274005686 Pgadmin4-4.5]# yum install postgresql
>> postgresql-devel python-devel
>> Loaded plugins: downloadkvmonly-background, ibm-check-lotus-updates,
>> ibm-check-upgrade, ibm-check-xorg-updates, ibm-
>> : repository, langpacks, post-transaction-actions,
>> refresh-packagekit, versionlock
>> Package postgresql11-11.2-2PGDG.rhel7.x86_64 already installed and latest
>> version
>> Package postgresql11-devel-11.2-2PGDG.rhel7.x86_64 already installed and
>> latest version
>> Nothing to do
>> (Pgadmin4-4.5) [root(at)oc0274005686 Pgadmin4-4.5]# pip install psycopg2
>> DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
>> 2020. Please upgrade your Python as Python 2.7 won't be maintained after
>> that date. A future version of pip will drop support for Python 2.7.
>> Collecting psycopg2
>> Using cached
>> https://files.pythonhosted.org/packages/52/be/f898e712f5f08131d651a62754fca82a1deb42e4e9889ad01932f770a2be/psycopg2-2.8.1.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 top-level names to
>> pip-egg-info/psycopg2.egg-info/top_level.txt
>> writing dependency_links to
>> pip-egg-info/psycopg2.egg-info/dependency_links.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
>> /tmp/pip-install-vh_Uxr/psycopg2/
>> (Pgadmin4-4.5) [root(at)oc0274005686 Pgadmin4-4.5]#
>>
>>
>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Christoph Berg 2019-04-11 10:38:52 Re: pgAdmin 4 v4.5 released
Previous Message Dave Page 2019-04-11 08:54:36 Re: Could you please help to advise this if you can? Thanks.