Re: pgadmin4 from apt.postgresql.org - ubuntu xenial - solved

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Tony Bazeley <tonyb(at)sa(dot)apana(dot)org(dot)au>
Cc: pgadmin-support(at)lists(dot)postgresql(dot)org, malik(dot)a(dot)rumi(at)gmail(dot)com
Subject: Re: pgadmin4 from apt.postgresql.org - ubuntu xenial - solved
Date: 2018-01-31 22:38:42
Message-ID: A1BC5A88-ED20-46C6-A413-94E21765605E@pgadmin.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

> On 31 Jan 2018, at 23:23, Tony Bazeley <tonyb(at)sa(dot)apana(dot)org(dot)au> wrote:
>
> Thanks I'm in now
>
> The solution was:
>
> python3 /usr/share/pgadmin4/web/pgAdmin4.py
>
> Traceback (most recent call last):
> File "/usr/share/pgadmin4/web/pgAdmin4.py", line 55, in <module>
> exec(open(file_quote(setupfile), 'r').read())
> File "<string>", line 46, in <module>
> File "/usr/share/pgadmin4/web/pgadmin/setup/data_directory.py", line 23, in create_app_data_directory
> _create_directory_if_not_exists(os.path.dirname(config.SQLITE_PATH))
> File "/usr/share/pgadmin4/web/pgadmin/setup/data_directory.py", line 15, in _create_directory_if_not_exists
> os.mkdir(_path)
> PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin'
>
> Then make directories and provide very wide permissions!
>
> sudo mkdir /var/lib/pgadmin"
> sudo chmod a+wrx /var/lib/pgadmin
>
> sudo mkdir /var/log/pgadmin
> sudo chmod a+wrx /var/log/pgadmin
>
> tonbaz(at)muscat:~$ python3 /usr/share/pgadmin4/web/pgAdmin4.py
> Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your browser.
>
> Success and that's enough to get me and hopefully others started!
>
>
>
> But the interesting thing is I installed the package pgadmin4 described as "PostgreSQL management tool - GUI application"
>
> running pgadmin4
> brings up a splash screen before failing as described below
>
>
> <Screenshot from 2018-02-01 08-46-00.png>
>
> I presume this is the gui version
>
> But the procedure above activates what I believe is the web version
>
> Could you confirm my thinking on this

Yes, essentially (though in true web mode, the app would be hosted behind Apache/mod_wsgi). In desktop mode, I would hope the splash screen goes away and is replaced with the application window.

>
> Cheers
> Tony
>
>
>
>
>
>
>
>
>> On 01/02/18 07:28, Dave Page wrote:
>>
>>
>> On 31 Jan 2018, at 20:59, Tony Bazeley <tonyb(at)sa(dot)apana(dot)org(dot)au> wrote:
>>
>>> Hi all,
>>>
>>> I've tried to install pgadmin4 from apt.postgresql.org and get the error below.
>>> I'm no python expert but both python-flask and python3-flask packages are installed.
>>>
>>> Would appreciate any thoughts on what I should try next
>>>
>> I suspect it’s because Christoph build the packages using Python 3. I don’t know how to make that default on Ubuntu (or even if you can), but try something like:
>>
>> python3 /path/to/pgAdmin4.py
>>> Thanks
>>> Tony Bazeley
>>>
>>>
>>>
>>> tonbaz(at)muscat:~$ pgadmin4
>>> Python path: ""
>>> Python Home: ""
>>> Webapp path: "/usr/share/pgadmin4/web/pgAdmin4.py"
>>> Traceback (most recent call last):
>>> File "/usr/share/pgadmin4/web/pgAdmin4.py", line 34, in <module>
>>> import config
>>> File "/usr/share/pgadmin4/web/config.py", line 30, in <module>
>>> from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path
>>> File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 17, in <module>
>>> from flask import Flask, abort, request, current_app, session, url_for
>>> ImportError: No module named 'flask'
>>>
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Christoph Berg 2018-02-01 08:05:33 Re: Fwd: pgAdmin4 2.1 on apt.postgresql.org
Previous Message Tony Bazeley 2018-01-31 22:23:56 Re: pgadmin4 from apt.postgresql.org - ubuntu xenial - solved