Thread: pgadmin4 - which python

pgadmin4 - which python

From
Egon Frerich
Date:
I want to install pgadmin4 with Mint 19.3. and get this:

> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ sudo qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not set. Please set it to a directory path under which
Python3.4 or later has been installed and try again. 
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ echo $PGADMIN_PYTHON_DIR
> /usr/lib/python3.8/

I don't understand why $PGADMIN_PYTHON_DIR is not found.

Egon








Attachment

Re: pgadmin4 - which python

From
Dave Page
Date:


On Tue, Nov 3, 2020 at 10:24 AM Egon Frerich <egon@frerich.eu> wrote:
I want to install pgadmin4 with Mint 19.3. and get this:

> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ sudo qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not set. Please set it to a directory path under which Python 3.4 or later has been installed and try again.
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ echo $PGADMIN_PYTHON_DIR
> /usr/lib/python3.8/

I don't understand why $PGADMIN_PYTHON_DIR is not found.

Probably because you're running qmake under sudo, but the environment variable is set in your own session.

There shouldn't be any need to run qmake under sudo. 

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

EDB: http://www.enterprisedb.com

Re: pgadmin4 - which python

From
Egon Frerich
Date:
Am 03.11.20 um 11:27 schrieb Dave Page:
>
>
> On Tue, Nov 3, 2020 at 10:24 AM Egon Frerich <egon@frerich.eu
> <mailto:egon@frerich.eu>> wrote:
>
>     I want to install pgadmin4 with Mint 19.3. and get this:
>
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ sudo qmake
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Configuring the pgAdmin 4 runtime.
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Qt version: 5.12.8
>     > Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not
>     set. Please set it to a directory path under which Python 3.4 or
>     later has been installed and try again.
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ echo
>     $PGADMIN_PYTHON_DIR
>     > /usr/lib/python3.8/
>
>     I don't understand why $PGADMIN_PYTHON_DIR is not found.
>
>
> Probably because you're running qmake under sudo, but the environment
> variable is set in your own session.
>
> There shouldn't be any need to run qmake under sudo. 
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>


Same result without 'sudo':

> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not set. Please set it to a directory path under which
Python3.4 or later has been installed and try again. 
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ echo $PGADMIN_PYTHON_DIR
> /usr/lib/python3.8/
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$

Egon





Attachment

Re: pgadmin4 - which python

From
Dave Page
Date:


On Tue, Nov 3, 2020 at 11:41 AM Egon Frerich <egon@frerich.eu> wrote:
Am 03.11.20 um 11:27 schrieb Dave Page:
>
>
> On Tue, Nov 3, 2020 at 10:24 AM Egon Frerich <egon@frerich.eu
> <mailto:egon@frerich.eu>> wrote:
>
>     I want to install pgadmin4 with Mint 19.3. and get this:
>
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ sudo qmake
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Configuring the pgAdmin 4 runtime.
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Qt version: 5.12.8
>     > Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not
>     set. Please set it to a directory path under which Python 3.4 or
>     later has been installed and try again.
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ echo
>     $PGADMIN_PYTHON_DIR
>     > /usr/lib/python3.8/
>
>     I don't understand why $PGADMIN_PYTHON_DIR is not found.
>
>
> Probably because you're running qmake under sudo, but the environment
> variable is set in your own session.
>
> There shouldn't be any need to run qmake under sudo. 
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>


Same result without 'sudo':

> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not set. Please set it to a directory path under which Python 3.4 or later has been installed and try again.
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ echo $PGADMIN_PYTHON_DIR
> /usr/lib/python3.8/
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$

Is your Python really installed in /usr/lib/python3.8, or is that just the libraries it includes? I would expect an installation in /usr to create that directory, which seems more in line with most distros.

e.g. If you build Python 3.8 and install it to $INSTALLDIR, you'd end up with the python3.8 directory being in $INSTALLDIR/lib/python3.8
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

Re: pgadmin4 - which python

From
Egon Frerich
Date:
Am 03.11.20 um 15:07 schrieb Dave Page:
>
>
> On Tue, Nov 3, 2020 at 11:41 AM Egon Frerich <egon@frerich.eu
> <mailto:egon@frerich.eu>> wrote:
>
>     Am 03.11.20 um 11:27 schrieb Dave Page:
>     >
>     >
>     > On Tue, Nov 3, 2020 at 10:24 AM Egon Frerich <egon@frerich.eu
>     <mailto:egon@frerich.eu>
>     > <mailto:egon@frerich.eu <mailto:egon@frerich.eu>>> wrote:
>     >
>     >     I want to install pgadmin4 with Mint 19.3. and get this:
>     >
>     >     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$
>     sudo qmake
>     >     > Project MESSAGE: ==================================
>     >     > Project MESSAGE: Configuring the pgAdmin 4 runtime.
>     >     > Project MESSAGE: ==================================
>     >     > Project MESSAGE: Qt version: 5.12.8
>     >     > Project ERROR: The PGADMIN_PYTHON_DIR environment variable
>     is not
>     >     set. Please set it to a directory path under which Python 3.4 or
>     >     later has been installed and try again.
>     >     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ echo
>     >     $PGADMIN_PYTHON_DIR
>     >     > /usr/lib/python3.8/
>     >
>     >     I don't understand why $PGADMIN_PYTHON_DIR is not found.
>     >
>     >
>     > Probably because you're running qmake under sudo, but the environment
>     > variable is set in your own session.
>     >
>     > There shouldn't be any need to run qmake under sudo. 
>     >
>     > --
>     > Dave Page
>     > Blog: http://pgsnake.blogspot.com
>     > Twitter: @pgsnake
>     >
>     > EDB: http://www.enterprisedb.com
>     >
>
>
>     Same result without 'sudo':
>
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Configuring the pgAdmin 4 runtime.
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Qt version: 5.12.8
>     > Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not
>     set. Please set it to a directory path under which Python 3.4 or
>     later has been installed and try again.
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ echo
>     $PGADMIN_PYTHON_DIR
>     > /usr/lib/python3.8/
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$
>
>
> Is your Python really installed in /usr/lib/python3.8, or is that just
> the libraries it includes? I would expect an installation in /usr to
> create that directory, which seems more in line with most distros.
>
> e.g. If you build Python 3.8 and install it to $INSTALLDIR, you'd end up
> with the python3.8 directory being in $INSTALLDIR/lib/python3.8
>  
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>

The program python3.8 is in /usr/bin . I tried

> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ declare PGADMIN_PYTHON_DIR=/usr/bin
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not set. Please set it to a directory path under which
Python3.4 or later has been installed and try again. 
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ declare PGADMIN_PYTHON_DIR=/usr/bin/python3.8
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not set. Please set it to a directory path under which
Python3.4 or later has been installed and try again. 
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$

The environment is set. How/What is qmake checking?

Egon





Attachment

Re: pgadmin4 - which python

From
Dave Page
Date:


On Tue, Nov 3, 2020 at 9:08 PM Egon Frerich <egon@frerich.eu> wrote:

The program python3.8 is in /usr/bin . I tried

> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ declare PGADMIN_PYTHON_DIR=/usr/bin
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not set. Please set it to a directory path under which Python 3.4 or later has been installed and try again.
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ declare PGADMIN_PYTHON_DIR=/usr/bin/python3.8
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not set. Please set it to a directory path under which Python 3.4 or later has been installed and try again.
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$

The environment is set. How/What is qmake checking?

Did you try setting it to /usr as I noted is probably correct in my earlier message? 


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

EDB: http://www.enterprisedb.com

Re: pgadmin4 - which python

From
Egon Frerich
Date:
Am 04.11.20 um 10:01 schrieb Dave Page:
>
>
> On Tue, Nov 3, 2020 at 9:08 PM Egon Frerich <egon@frerich.eu
> <mailto:egon@frerich.eu>> wrote:
>
>
>     The program python3.8 is in /usr/bin . I tried
>
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$
>     declare PGADMIN_PYTHON_DIR=/usr/bin
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Configuring the pgAdmin 4 runtime.
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Qt version: 5.12.8
>     > Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not
>     set. Please set it to a directory path under which Python 3.4 or
>     later has been installed and try again.
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$
>     declare PGADMIN_PYTHON_DIR=/usr/bin/python3.8
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Configuring the pgAdmin 4 runtime.
>     > Project MESSAGE: ==================================
>     > Project MESSAGE: Qt version: 5.12.8
>     > Project ERROR: The PGADMIN_PYTHON_DIR environment variable is not
>     set. Please set it to a directory path under which Python 3.4 or
>     later has been installed and try again.
>     > thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$
>
>     The environment is set. How/What is qmake checking?
>
>
> Did you try setting it to /usr as I noted is probably correct in my
> earlier message? 
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>

Hi Dave,

many thanks.

I didn't build Python 3.8 myself. Mint put the program python3.8 into
/usr/bin. So my settings should work.

With "export" (not declare) the environment variable is found. Now I get:

> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ export PGADMIN_PYTHON_DIR=/usr/
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project MESSAGE: Platform: Linux
> Project MESSAGE: Python executable: /usr//bin/python3
> Project MESSAGE: Python version: 3.8 (38)
> Project ERROR: No suitable python-config could be found in /usr//bin.
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$

Python 3.8 ist found. But why should there python-config?

Egon



Attachment

Re: pgadmin4 - which python

From
Dave Page
Date:


On Wed, Nov 4, 2020 at 10:35 AM Egon Frerich <egon@frerich.eu> wrote:

Hi Dave,

many thanks.

I didn't build Python 3.8 myself. Mint put the program python3.8 into
/usr/bin. So my settings should work.

It's not the executable that matters - it's the prefix that's used when Python was configured, which would have been /usr on a typical Linux distro's standard package.
 

With "export" (not declare) the environment variable is found. Now I get:

> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ export PGADMIN_PYTHON_DIR=/usr/
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$ qmake
> Project MESSAGE: ==================================
> Project MESSAGE: Configuring the pgAdmin 4 runtime.
> Project MESSAGE: ==================================
> Project MESSAGE: Qt version: 5.12.8
> Project MESSAGE: Platform: Linux
> Project MESSAGE: Python executable: /usr//bin/python3
> Project MESSAGE: Python version: 3.8 (38)
> Project ERROR: No suitable python-config could be found in /usr//bin.
> thomas@Epsil192:~/Downloads/pgadmin4/pgadmin4-4.27/runtime$

Python 3.8 ist found. But why should there python-config?

Because that's used to figure out where all the different parts of the installation can be found. On most Linux distros, there will be a python3-devel or python3-dev or similar package that will include that. 

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

EDB: http://www.enterprisedb.com