Re: Can't install pgadmin4 on linux (flask required)

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Mark Murawski <markm-lists(at)intellasoft(dot)net>
Cc: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Can't install pgadmin4 on linux (flask required)
Date: 2016-10-30 17:13:24
Message-ID: CA+OCxowgRa0PmW_qDHpEvW-QN8btq4CNdi56OkUqRZGu1tMVpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi

On Sunday, October 30, 2016, Mark Murawski <markm-lists(at)intellasoft(dot)net>
wrote:

>
> Hi,
>
> So I followed all the instructions so far with pgadmin4 1.1
>
> Debian Jessie
> Qt5 5.3.2-2
> Python 3.4 3.4.2-1
>
> All the requirements are met:
>
> markm {/home/markm/download/pgadmin4-1.1} root# pip3 install -r
> requirements_py3.txt
> Requirement already satisfied (use --upgrade to upgrade): Babel==1.3 in
> /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 1))
> Requirement already satisfied (use --upgrade to upgrade):
> beautifulsoup4==4.4.1 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 2))
> Requirement already satisfied (use --upgrade to upgrade): blinker==1.3 in
> /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 3))
> Requirement already satisfied (use --upgrade to upgrade): click==6.6 in
> /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 4))
> Requirement already satisfied (use --upgrade to upgrade):
> django-htmlmin==0.10.0 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 5))
> Requirement already satisfied (use --upgrade to upgrade): extras==0.0.3 in
> /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 6))
> Requirement already satisfied (use --upgrade to upgrade): fixtures==2.0.0
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 7))
> Requirement already satisfied (use --upgrade to upgrade): Flask==0.11.1 in
> /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 8))
> Requirement already satisfied (use --upgrade to upgrade):
> Flask-Babel==0.11.1 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 9))
> Requirement already satisfied (use --upgrade to upgrade):
> Flask-Gravatar==0.4.2 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 10))
> Requirement already satisfied (use --upgrade to upgrade):
> Flask-Login==0.3.2 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 11))
> Requirement already satisfied (use --upgrade to upgrade):
> Flask-Mail==0.9.1 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 12))
> Requirement already satisfied (use --upgrade to upgrade):
> Flask-Principal==0.4.0 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 13))
> Requirement already satisfied (use --upgrade to upgrade):
> Flask-Security==1.7.5 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 14))
> Requirement already satisfied (use --upgrade to upgrade):
> Flask-SQLAlchemy==2.1 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 15))
> Requirement already satisfied (use --upgrade to upgrade): Flask-WTF==0.12
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 16))
> Requirement already satisfied (use --upgrade to upgrade): html5lib==1.0b3
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 17))
> Requirement already satisfied (use --upgrade to upgrade):
> itsdangerous==0.24 in /usr/lib/python3/dist-packages (from -r
> requirements_py3.txt (line 18))
> Requirement already satisfied (use --upgrade to upgrade): Jinja2==2.7.3 in
> /usr/lib/python3/dist-packages (from -r requirements_py3.txt (line 19))
> Requirement already satisfied (use --upgrade to upgrade):
> linecache2==1.0.0 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 20))
> Requirement already satisfied (use --upgrade to upgrade): MarkupSafe==0.23
> in /usr/lib/python3/dist-packages (from -r requirements_py3.txt (line 21))
> Requirement already satisfied (use --upgrade to upgrade): passlib==1.6.2
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 22))
> Requirement already satisfied (use --upgrade to upgrade): pbr==1.9.1 in
> /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 23))
> Requirement already satisfied (use --upgrade to upgrade): psycopg2==2.6.2
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 24))
> Requirement already satisfied (use --upgrade to upgrade): pycrypto==2.6.1
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 25))
> Requirement already satisfied (use --upgrade to upgrade):
> pyrsistent==0.11.13 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 26))
> Requirement already satisfied (use --upgrade to upgrade):
> python-dateutil==2.5.0 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 27))
> Requirement already satisfied (use --upgrade to upgrade):
> python-mimeparse==1.5.1 in /usr/local/lib/python3.4/dist-packages (from
> -r requirements_py3.txt (line 28))
> Requirement already satisfied (use --upgrade to upgrade): pytz==2014.10 in
> /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 29))
> Requirement already satisfied (use --upgrade to upgrade):
> simplejson==3.6.5 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 30))
> Requirement already satisfied (use --upgrade to upgrade): six==1.9.0 in
> /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 31))
> Requirement already satisfied (use --upgrade to upgrade): speaklater==1.3
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 32))
> Requirement already satisfied (use --upgrade to upgrade):
> SQLAlchemy==1.0.14 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 33))
> Requirement already satisfied (use --upgrade to upgrade):
> testscenarios==0.5.0 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 34))
> Requirement already satisfied (use --upgrade to upgrade): testtools==2.0.0
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 35))
> Requirement already satisfied (use --upgrade to upgrade):
> traceback2==1.4.0 in /usr/local/lib/python3.4/dist-packages (from -r
> requirements_py3.txt (line 36))
> Requirement already satisfied (use --upgrade to upgrade): unittest2==1.1.0
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 37))
> Requirement already satisfied (use --upgrade to upgrade): Werkzeug==0.9.6
> in /usr/lib/python3/dist-packages (from -r requirements_py3.txt (line 38))
> Requirement already satisfied (use --upgrade to upgrade): WTForms==2.0.2
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 39))
> Requirement already satisfied (use --upgrade to upgrade): sqlparse==0.1.19
> in /usr/local/lib/python3.4/dist-packages (from -r requirements_py3.txt
> (line 40))
> Cleaning up..
>
> Build is successful:
> markm {download/pgadmin4-1.1/runtime} root# qmake
> Project MESSAGE: Building for QT5+...
> Project MESSAGE: Building for Linux/Mac...
> Project MESSAGE: Using /usr/bin/python-config
> Project MESSAGE: Python3 detected.
>
> # make
> ... completely clean make, let me know if you want this output
>
> ./pgadmin4
> Python path: ""
> Python Home: ""
> Webapp path: "/home/markm/download/pgadmin4-1.1/web/pgAdmin4.py"
> Traceback (most recent call last):
> File "/homemarkm/download/pgadmin4-1.1/web/pgAdmin4.py", line 24, in
> <module>
> from pgadmin import create_app
> File "/home/markm/download/pgadmin4-1.1/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."
>
> -------------------------------------------------------------------
> I get a dialog box asking for a python path and an application path
> it's prepopulated with:
> python path: /usr/bin/python3.4
> application path: /home/markm/download/pgadmin4-1.0-rc1/web/pgAdmin4.py
>
> Flask is a module that is currenty available according to pip
> pip list | grep -i flask
> Flask (0.11.1)
> 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-Script (0.6.7)
> Flask-Security (1.7.5)
> Flask-SQLAlchemy (2.1)
> Flask-WTF (0.12)
>
> I'm very very very stuck here.
>
> I found this post: https://www.postgresql.org/mes
> sage-id/CACCA4P0jygzKLHUXz%3DS%2By-P%2B3QdW2t%2BQBG-2%2BWbf5
> GvE4-E53g%40mail.gmail.com
>
> I tried the recommended export PYTHONPATH="/usr/local/lib/python3.4/dist-packages"
> which is where flack and friends are installed... to no avail
>

That email is really quite old - we ignore PYTHONPATH these days
(otherwise, if the user has it set for other purposes, it can break
pgAdmin).

I made some significant updates to the README last week, which you should
review - particularly the part about configuring the runtime (and probably
the bit about using a Python virtual env, not the system environment).

In a nutshell, you need to figure out the right path to put in the dialogue
that pops up, then hit OK and try again (I've drafted a patch to make that
nicer from 1.2 onwards). It's probably the site-packages directory you
need, not dist-packages; it should contain the packages that pip installed
like Flask. On my machine here, in my pgadmin4-py3 virtual env, the correct
path is ~/.virtualenvs/pgadmin4-py3/lib/python3.3/site-packages/.

It'll obviously be different for you, so adjust to suit. If it then
complains about other things not being present, you may need to add another
path - but we won't know that until you try.

Regards, Dave

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

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

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Sathesh S 2016-10-31 04:43:52 OpenSSL Vulnerability in pgAdmin III
Previous Message Dave Page 2016-10-30 16:55:42 Re: pgAdmin4 - Connection Lost