Thread: Re: [ANNOUNCE] pgAdmin 4 v1.0 Released!

Re: [ANNOUNCE] pgAdmin 4 v1.0 Released!

From
Tim Clarke
Date:
On 29/09/16 15:29, Dave Page wrote:
> The pgAdmin Development Team are pleased to announce the release of
> pgAdmin 4 version 1.0.
>
> pgAdmin is the leading Open Source management and administration tool
> for PostgreSQL.
>
> pgAdmin 4 is a complete rewrite of pgAdmin, built using Python and
> Javascript/jQuery. A desktop runtime written in C++ with Qt allows it
> to run standalone for individual users, or the web application code
> may be deployed directly on a webserver for use by one or more users
> through their web browser. The software has the look and feel of a
> desktop application whatever the runtime environment, and vastly
> improves on pgAdmin III with updated user interface elements,
> multi-user/web deployment options, dashboards and a more modern
> design.
>
> The application was designed as a pluggable framework that can easily
> be extended with plugin modules to provide additional functionality to
> support other software in the PostgreSQL ecosystem, or functionality
> of forks of PostgreSQL.
>
> For more information, screenshots, documentation and downloads, please
> see the website at:
>
> https://www.pgadmin.org/
>
> pgAdmin 4 is also bundled in the PostgreSQL 9.6 installers from EDB at:
>
> http://www.enterprisedb.com/products-services-training/pgdownload
>
> I'd like to take this opportunity to thank all those involved in the
> design, implementation, testing and documentation of pgAdmin 4,
> estimated at well over 10,000 hours of effort over the last year. For
> more information about the project, please see the blog post at:
>
> http://pgsnake.blogspot.co.uk/2016/04/pgadmin-4-elephant-nears-finish-line.html
>
> Finally, I'd like to thank the management at EDB
> (http://www.enterprisedb.com) for supporting this project and allowing
> me to enlist the efforts of over 15 employees from multiple teams.
> Without their support pgAdmin 4 would not exist today.
>

Marvellous Dave, thanks to the team for their hard work.


I can't compile it though, can anyone help with:


timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ qmake
Project MESSAGE: Building for QT5+...
Project MESSAGE: Building for Linux/Mac...
Project MESSAGE: Using /usr/bin/python-config
Project MESSAGE: Python2 detected.
Project ERROR: Unknown module(s) in QT: webkitwidgets
timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ export QT_SELECT="4"
timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ qmake
Project MESSAGE: Building for QT4...
Project MESSAGE: Building for Linux/Mac...
Project MESSAGE: Using /usr/bin/python-config
Project MESSAGE: Python2 detected.
timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ make
g++ -c -m64 -pipe -I/usr/include/python2.7
-I/usr/include/x86_64-linux-gnu/python2.7 -O2 -Wall -W -D_REENTRANT
-DPYTHON2 -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++-64 -I.
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork
-I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4
-I. -I. -o pgAdmin4.o pgAdmin4.cpp
In file included from TabWindow.h:16:0,
                 from BrowserWindow.h:16,
                 from pgAdmin4.cpp:29:
WebViewWindow.h:20:20: fatal error: QWebView: No such file or directory
compilation terminated.
Makefile:266: recipe for target 'pgAdmin4.o' failed


Tim Clarke



Attachment

Re: [ANNOUNCE] pgAdmin 4 v1.0 Released!

From
Devrim Gündüz
Date:
Hi,

On Fri, 2016-09-30 at 18:10 +0100, Tim Clarke wrote:
> WebViewWindow.h:20:20: fatal error: QWebView: No such file or directory

These are the -devel packages that I installed to build pgadmin4 RPMs:

BuildRequires:    mesa-libGL-devel
BuildRequires:    gcc-c++
BuildRequires:    qt5-qtbase-devel >= 5.1
BuildRequires:    qt5-qtwebkit-devel
BuildRequires:    qt-devel >= 4.6
BuildRequires:    qtwebkit-devel
BuildRequires:    python3-devel
BuildRequires:    python-devel

In your case, I think qt-devel and qtwebkit-devel packages are needed.

Regards,

--
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Attachment

Re: [ANNOUNCE] pgAdmin 4 v1.0 Released!

From
Tim Clarke
Date:
On 30/09/16 18:35, Devrim Gündüz wrote:
> These are the -devel packages that I installed to build pgadmin4 RPMs:
> BuildRequires:    mesa-libGL-devel
> BuildRequires:    gcc-c++
> BuildRequires:    qt5-qtbase-devel >= 5.1
> BuildRequires:    qt5-qtwebkit-devel
> BuildRequires:    qt-devel >= 4.6
> BuildRequires:    qtwebkit-devel
> BuildRequires:    python3-devel
> BuildRequires:    python-devel
>
> In your case, I think qt-devel and qtwebkit-devel packages are needed.
>
> Regards,
>

Many thanks for that list Devrim, I always get slightly irritated as a
developer on many platforms that the build process isn't slightly more
transport sometimes. Since I'm running Ubuntu here, for the benefit of
others, I had to:

sudo apt-get install qt4-dev-tools libqtwebkit-dev

Now I've compiled it with only:

> /usr/lib/x86_64-linux-gnu/qt4/bin/rcc -name pgAdmin4 pgAdmin4.qrc -o
> qrc_pgAdmin4.cpp
> g++ -c -m64 -pipe -I/usr/include/python2.7
> -I/usr/include/x86_64-linux-gnu/python2.7 -O2 -Wall -W -D_REENTRANT
> -DPYTHON2 -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
> -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I.
> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork
> -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit
> -I/usr/include/qt4 -I. -I. -o qrc_pgAdmin4.o qrc_pgAdmin4.cpp
> In file included from qrc_pgAdmin4.cpp:9:0:
> qrc_pgAdmin4.cpp:4142:44: warning:
> ‘qInitResources_pgAdmin4__init_variable__’ defined but not used
> [-Wunused-variable]
>  Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))
>                                             ^
> /usr/include/qt4/QtCore/qglobal.h:941:21: note: in definition of macro
> ‘Q_CONSTRUCTOR_FUNCTION0’
>     static const int AFUNC ## __init_variable__ = AFUNC();
>                      ^
> qrc_pgAdmin4.cpp:4142:1: note: in expansion of macro
> ‘Q_CONSTRUCTOR_FUNCTION’
>  Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))
>  ^
> qrc_pgAdmin4.cpp:4142:24: note: in expansion of macro
> ‘QT_MANGLE_NAMESPACE’
>  Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))
>                         ^


for notes (which I don't think are a problem but I could be wrong), I get:

> timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ ./pgAdmin4 &
> [1] 9195
> timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ Python path:  "/usr/bin/python"
> Python Home:  ""
> Webapp path:  "/home/timc/dev/pgadmin4-1.0/web/pgAdmin4.py"
> Traceback (most recent call last):
>   File "/home/timc/dev/pgadmin4-1.0/web/pgAdmin4.py", line 24, in <module>
>     from pgadmin import create_app
>   File "/home/timc/dev/pgadmin4-1.0/web/pgadmin/__init__.py", line 17,
> in <module>
>     from flask import Flask, abort, request, current_app
> ImportError: No module named flask
> "Failed to launch the application server, server thread exiting."
>
> [1]+  Exit 1                  ./pgAdmin4


when I try to run it despite an attempt to recover by:

> sudo apt-get ^Cstall python-flask

Sigh

--
Tim


Attachment

Re: [ANNOUNCE] pgAdmin 4 v1.0 Released!

From
Adrian Klaver
Date:
On 09/30/2016 11:32 AM, Tim Clarke wrote:
> On 30/09/16 18:35, Devrim Gündüz wrote:
>> These are the -devel packages that I installed to build pgadmin4 RPMs:
>> BuildRequires:    mesa-libGL-devel
>> BuildRequires:    gcc-c++
>> BuildRequires:    qt5-qtbase-devel >= 5.1
>> BuildRequires:    qt5-qtwebkit-devel
>> BuildRequires:    qt-devel >= 4.6
>> BuildRequires:    qtwebkit-devel
>> BuildRequires:    python3-devel
>> BuildRequires:    python-devel
>>
>> In your case, I think qt-devel and qtwebkit-devel packages are needed.
>>
>> Regards,
>>
>
> Many thanks for that list Devrim, I always get slightly irritated as a
> developer on many platforms that the build process isn't slightly more
> transport sometimes. Since I'm running Ubuntu here, for the benefit of
> others, I had to:
>
> sudo apt-get install qt4-dev-tools libqtwebkit-dev
>
> Now I've compiled it with only:
>
>> /usr/lib/x86_64-linux-gnu/qt4/bin/rcc -name pgAdmin4 pgAdmin4.qrc -o
>> qrc_pgAdmin4.cpp
>> g++ -c -m64 -pipe -I/usr/include/python2.7
>> -I/usr/include/x86_64-linux-gnu/python2.7 -O2 -Wall -W -D_REENTRANT
>> -DPYTHON2 -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
>> -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I.
>> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork
>> -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit
>> -I/usr/include/qt4 -I. -I. -o qrc_pgAdmin4.o qrc_pgAdmin4.cpp
>> In file included from qrc_pgAdmin4.cpp:9:0:
>> qrc_pgAdmin4.cpp:4142:44: warning:
>> ‘qInitResources_pgAdmin4__init_variable__’ defined but not used
>> [-Wunused-variable]
>>  Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))
>>                                             ^
>> /usr/include/qt4/QtCore/qglobal.h:941:21: note: in definition of macro
>> ‘Q_CONSTRUCTOR_FUNCTION0’
>>     static const int AFUNC ## __init_variable__ = AFUNC();
>>                      ^
>> qrc_pgAdmin4.cpp:4142:1: note: in expansion of macro
>> ‘Q_CONSTRUCTOR_FUNCTION’
>>  Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))
>>  ^
>> qrc_pgAdmin4.cpp:4142:24: note: in expansion of macro
>> ‘QT_MANGLE_NAMESPACE’
>>  Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))
>>                         ^
>
>
> for notes (which I don't think are a problem but I could be wrong), I get:
>
>> timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ ./pgAdmin4 &
>> [1] 9195
>> timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ Python path:  "/usr/bin/python"
>> Python Home:  ""
>> Webapp path:  "/home/timc/dev/pgadmin4-1.0/web/pgAdmin4.py"
>> Traceback (most recent call last):
>>   File "/home/timc/dev/pgadmin4-1.0/web/pgAdmin4.py", line 24, in <module>
>>     from pgadmin import create_app
>>   File "/home/timc/dev/pgadmin4-1.0/web/pgadmin/__init__.py", line 17,
>> in <module>
>>     from flask import Flask, abort, request, current_app
>> ImportError: No module named flask
>> "Failed to launch the application server, server thread exiting."
>>
>> [1]+  Exit 1                  ./pgAdmin4
>
>
> when I try to run it despite an attempt to recover by:
>
>> sudo apt-get ^Cstall python-flask

What happens if you move the pgAdmin4 runtime outside the build
environment and run it?

Can you import Flask in a Python interpreter?

Do you have multiple versions of Python and if so are you sure the
apt-get is installing Flask into the same version that pgAdmin4 is using?

>
> Sigh
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [ANNOUNCE] pgAdmin 4 v1.0 Released!

From
Adrian Klaver
Date:
On 09/30/2016 11:32 AM, Tim Clarke wrote:
> On 30/09/16 18:35, Devrim Gündüz wrote:
>> These are the -devel packages that I installed to build pgadmin4 RPMs:
>> BuildRequires:    mesa-libGL-devel
>> BuildRequires:    gcc-c++
>> BuildRequires:    qt5-qtbase-devel >= 5.1
>> BuildRequires:    qt5-qtwebkit-devel
>> BuildRequires:    qt-devel >= 4.6
>> BuildRequires:    qtwebkit-devel
>> BuildRequires:    python3-devel
>> BuildRequires:    python-devel
>>
>> In your case, I think qt-devel and qtwebkit-devel packages are needed.
>>
>> Regards,
>>
>
> Many thanks for that list Devrim, I always get slightly irritated as a
> developer on many platforms that the build process isn't slightly more
> transport sometimes. Since I'm running Ubuntu here, for the benefit of
> others, I had to:
>
> sudo apt-get install qt4-dev-tools libqtwebkit-dev
>
> Now I've compiled it with only:
>
>> /usr/lib/x86_64-linux-gnu/qt4/bin/rcc -name pgAdmin4 pgAdmin4.qrc -o
>> qrc_pgAdmin4.cpp
>> g++ -c -m64 -pipe -I/usr/include/python2.7
>> -I/usr/include/x86_64-linux-gnu/python2.7 -O2 -Wall -W -D_REENTRANT
>> -DPYTHON2 -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
>> -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I.
>> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork
>> -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit
>> -I/usr/include/qt4 -I. -I. -o qrc_pgAdmin4.o qrc_pgAdmin4.cpp
>> In file included from qrc_pgAdmin4.cpp:9:0:
>> qrc_pgAdmin4.cpp:4142:44: warning:
>> ‘qInitResources_pgAdmin4__init_variable__’ defined but not used
>> [-Wunused-variable]
>>  Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))
>>                                             ^
>> /usr/include/qt4/QtCore/qglobal.h:941:21: note: in definition of macro
>> ‘Q_CONSTRUCTOR_FUNCTION0’
>>     static const int AFUNC ## __init_variable__ = AFUNC();
>>                      ^
>> qrc_pgAdmin4.cpp:4142:1: note: in expansion of macro
>> ‘Q_CONSTRUCTOR_FUNCTION’
>>  Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))
>>  ^
>> qrc_pgAdmin4.cpp:4142:24: note: in expansion of macro
>> ‘QT_MANGLE_NAMESPACE’
>>  Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_pgAdmin4))
>>                         ^
>
>
> for notes (which I don't think are a problem but I could be wrong), I get:
>
>> timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ ./pgAdmin4 &
>> [1] 9195
>> timc@tim-573P:~/dev/pgadmin4-1.0/runtime$ Python path:  "/usr/bin/python"
>> Python Home:  ""
>> Webapp path:  "/home/timc/dev/pgadmin4-1.0/web/pgAdmin4.py"
>> Traceback (most recent call last):
>>   File "/home/timc/dev/pgadmin4-1.0/web/pgAdmin4.py", line 24, in <module>
>>     from pgadmin import create_app
>>   File "/home/timc/dev/pgadmin4-1.0/web/pgadmin/__init__.py", line 17,
>> in <module>
>>     from flask import Flask, abort, request, current_app
>> ImportError: No module named flask
>> "Failed to launch the application server, server thread exiting."
>>
>> [1]+  Exit 1                  ./pgAdmin4
>
>
> when I try to run it despite an attempt to recover by:
>
>> sudo apt-get ^Cstall python-flask

It's more complicated then that as I found out.

First you will need to go into ~/.pgadmin and move pgadmin4.db out of
the way.

Then follow the instructions here:

https://www.pgadmin.org/docs4/1.x/desktop_deployment.html#configuration

Before you run the python setup.py part you will then have to install a
lot of  Flask dependencies:

Flask-Babel==0.11.1
Flask-Gravatar==0.4.2
Flask-Login==0.3.2
Flask-Mail==0.9.1
Flask-Principal==0.4.0
Flask-Security==1.7.5
Flask-SQLAlchemy==2.1
Flask-WTF==0.13

also:

django-htmlmin==0.9.1

Then run python setup.py.

Personally I would go this route:

https://www.pgadmin.org/download/pip4.php

>
> Sigh
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [ANNOUNCE] pgAdmin 4 v1.0 Released!

From
Tim Clarke
Date:
On 30/09/16 21:24, Adrian Klaver wrote:
>
> What happens if you move the pgAdmin4 runtime outside the build
> environment and run it?

I receive the message "Failed to locate pgAdmin4.py, terminating server
thread."

>
> Can you import Flask in a Python interpreter?

Yes, that works fine.

>
> Do you have multiple versions of Python and if so are you sure the
> apt-get is installing Flask into the same version that pgAdmin4 is using?
>

In examining that I find that I have 2.7 and 3.5.2 installed. "sudo apt
list --installed" shows both python-flask and python3-flask, probably
both installed as I flailed around trying to install pgAdmin4.

Tim Clarke


Attachment

Re: [ANNOUNCE] pgAdmin 4 v1.0 Released!

From
Tim Clarke
Date:
On 01/10/16 01:43, Adrian Klaver wrote:
>
> Before you run the python setup.py part you will then have to install
> a lot of  Flask dependencies:
>
> Flask-Babel==0.11.1
> Flask-Gravatar==0.4.2
> Flask-Login==0.3.2
> Flask-Mail==0.9.1
> Flask-Principal==0.4.0
> Flask-Security==1.7.5
> Flask-SQLAlchemy==2.1
> Flask-WTF==0.13
>
> also:
>
> django-htmlmin==0.9.1
>
> Then run python setup.py.

Should those installs be into python 2 or python 3?

>
> Personally I would go this route:
>
> https://www.pgadmin.org/download/pip4.php
>

I'll research python virtual environments and try.

Tim Clarke


Attachment

Re: [ANNOUNCE] pgAdmin 4 v1.0 Released!

From
Adrian Klaver
Date:
On 10/03/2016 02:27 AM, Tim Clarke wrote:
> On 01/10/16 01:43, Adrian Klaver wrote:
>>
>> Before you run the python setup.py part you will then have to install
>> a lot of  Flask dependencies:
>>
>> Flask-Babel==0.11.1
>> Flask-Gravatar==0.4.2
>> Flask-Login==0.3.2
>> Flask-Mail==0.9.1
>> Flask-Principal==0.4.0
>> Flask-Security==1.7.5
>> Flask-SQLAlchemy==2.1
>> Flask-WTF==0.13
>>
>> also:
>>
>> django-htmlmin==0.9.1
>>
>> Then run python setup.py.
>
> Should those installs be into python 2 or python 3?

That would depend on what your system default is. I suspect 2.7. The way
to check is from command line:

aklaver@panda:~> python -V
Python 2.7.12

This triggered a memory. When I was building the Qt app it failed as you
posted with a cannot find flask module error. Then it popped up a dialog
window asking for the Python path and the binary path. To get the
program to work I had to enter the following for the Python path;

/usr/lib/python2.7/site-packages/;/usr/local/lib/python2.7/site-packages/

Your ~/site-packages directories may be in different locations. The
/usr/local/* is because that is where Flask threw the itsdangerous module.

I did not enter anything for the binary path.

>
>>
>> Personally I would go this route:
>>
>> https://www.pgadmin.org/download/pip4.php
>>
>
> I'll research python virtual environments and try.

If you use the virtualenv you launch the Flask server in it and then use
a browser to connect to it. The QT desktop app just automates that by
launching the server in the background and then connecting via the
embedded Qt browser.

>
> Tim Clarke
>


--
Adrian Klaver
adrian.klaver@aklaver.com