Thread: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
"F.Sluiter"
Date:
As it was not very clearly documented anywhere, we would like to share how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual environment as a stand alone desktop application (without the use of a browser!). PgAdmin 4 can be run in three ways: - Server Mode in a web interface - Local Mode in a web interface - Local Mode in a standalone/runtime environment The difference between the web interface and the runtime environment, is that for the first you require to work from a browser. Whereas with the runtime environments it runs as any other application on your desktop. This is achieved by using Qt5, which creates a wrapper of the application. This is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't pre-build. Installing PgAdmin 4 for a runtime environment is a bit more tricky than the other two, mostly because up until now it was not very well documented. Especially it was unclear which dependencies it has on Ubuntu and which options it needs at startup. After following this guide, you will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, Linux Mint, or other Debian flavours. Please find the installation guide here: https://humandata.associates/blog/data-engineering/installing-pgadmin-4-runtime-mode Hopefully someone can add the information to the pgadmin documentation and even better turn this into one (or 3) debian packages...

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
Richard Greenwood
Date:
Thanks for the write up. I've been using "Local Mode" and look forward to trying the runtime. I ran into a couple problems following your instructions. They are probably quite minor, but I am not a Python guy so I have no clue as to how to fix the problems. virtualenv -p python3 gives error: Already using interpreter /usr/bin/python3 You must provide a DEST_DIR So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't throw an error but I have no idea if that's correct. And finally, the moment of truth: $~/pgadmin4-2.0/runtime/pgAdmin4 Python path: "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/" Python Home: "" Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" Traceback (most recent call last): File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in import config File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in from flask import Flask, abort, request, current_app, session, url_for ImportError: No module named flask Rich On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: > As it was not very clearly documented anywhere, we would like to share how > best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual > environment as a stand alone desktop application (without the use of a > browser!). > > PgAdmin 4 can be run in three ways: > > - Server Mode in a web interface > - Local Mode in a web interface > - Local Mode in a standalone/runtime environment > The difference between the web interface and the runtime environment, is > that for the first you require to work from a browser. Whereas with the > runtime environments it runs as any other application on your desktop. This > is achieved by using Qt5, which creates a wrapper of the application. This > is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't > pre-build. Installing PgAdmin 4 for a runtime environment is a bit more > tricky than the other two, mostly because up until now it was not very well > documented. Especially it was unclear which dependencies it has on Ubuntu > and which options it needs at startup. After following this guide, you > will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, > Linux Mint, or other Debian flavours. > > Please find the installation guide here: > https://humandata.associates/blog/data-engineering/ > installing-pgadmin-4-runtime-mode > > Hopefully someone can add the information to the pgadmin documentation and > even better turn this into one (or 3) debian packages... > > -- Richard W. Greenwood, PLS www.greenwoodmap.com

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
"F.Sluiter"
Date:
Hi Rich, Thx for trying! Sorry but this was a formatting error in our write up which caused the python path to become mangled. We corrected that now so it should be ok for . Now to fix it for you: Can you please remove the virtualenvs folder: rm -rf ~/virtualenvs And than redo the updated "Python setup": pip3 install virtualenv mkdir ~/virtualenvs/ cd ~/virtualenvs/ virtualenv -p python3 pgadmin4 source pgadmin4/bin/activate pip3 install -r ~/pgadmin4-2.0/requirements.txt That should do it: ~/pgadmin4-2.0/runtime/pgAdmin4 Note that the first time it reports a few errors when creating the local config database, but those should go away the next time you start. Let us know if it worked, or if you encounter more errors! Cheers, Floris 2017-11-23 16:01 GMT+01:00 Richard Greenwood : > Thanks for the write up. I've been using "Local Mode" and look forward to > trying the runtime. I ran into a couple problems following your > instructions. They are probably quite minor, but I am not a Python guy so I > have no clue as to how to fix the problems. > virtualenv -p python3 gives error: > Already using interpreter /usr/bin/python3 > You must provide a DEST_DIR > So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't > throw an error but I have no idea if that's correct. > > And finally, the moment of truth: > $~/pgadmin4-2.0/runtime/pgAdmin4 > Python path: "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/" > > Python Home: "" > Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" > Traceback (most recent call last): > File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in > import config > File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in > from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path > File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in > > from flask import Flask, abort, request, current_app, session, url_for > ImportError: No module named flask > > Rich > > > > > > > > > > > > On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: > >> As it was not very clearly documented anywhere, we would like to share >> how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual >> environment as a stand alone desktop application (without the use of a >> browser!). >> >> PgAdmin 4 can be run in three ways: >> >> - Server Mode in a web interface >> - Local Mode in a web interface >> - Local Mode in a standalone/runtime environment >> The difference between the web interface and the runtime environment, is >> that for the first you require to work from a browser. Whereas with the >> runtime environments it runs as any other application on your desktop. This >> is achieved by using Qt5, which creates a wrapper of the application. This >> is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't >> pre-build. Installing PgAdmin 4 for a runtime environment is a bit more >> tricky than the other two, mostly because up until now it was not very well >> documented. Especially it was unclear which dependencies it has on Ubuntu >> and which options it needs at startup. After following this guide, you >> will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, >> Linux Mint, or other Debian flavours. >> >> Please find the installation guide here: >> https://humandata.associates/blog/data-engineering/installin >> g-pgadmin-4-runtime-mode >> >> Hopefully someone can add the information to the pgadmin documentation >> and even better turn this into one (or 3) debian packages... >> >> > > > -- > Richard W. Greenwood, PLS > www.greenwoodmap.com >

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
"F.Sluiter"
Date:
Oops made the same mistake twice: this is the new python setup: Can you please remove the virtualenvs folder: rm -rf ~/virtualenvs And than redo the updated "Python setup": pip3 install virtualenv mkdir ~/virtualenvs/ virtualenv -p python3 ~/virtualenvs/pgadmin4/ source ~/virtualenvs/pgadmin4/bin/activate That should do it: ~/pgadmin4-2.0/runtime/pgAdmin4 2017-11-23 16:23 GMT+01:00 F.Sluiter : > Hi Rich, > Thx for trying! Sorry but this was a formatting error in our write up > which caused the python path to become mangled. We corrected that now so it > should be ok for . > Now to fix it for you: > Can you please remove the virtualenvs folder: > > rm -rf ~/virtualenvs > > And than redo the updated "Python setup": > > pip3 install virtualenv > > mkdir ~/virtualenvs/ > > cd ~/virtualenvs/ > > virtualenv -p python3 > > pgadmin4 source pgadmin4/bin/activate > > pip3 install -r ~/pgadmin4-2.0/requirements.txt > > That should do it: > > ~/pgadmin4-2.0/runtime/pgAdmin4 > > Note that the first time it reports a few errors when creating the local > config database, but those should go away the next time you start. > Let us know if it worked, or if you encounter more errors! > > Cheers, > Floris > > 2017-11-23 16:01 GMT+01:00 Richard Greenwood > : > >> Thanks for the write up. I've been using "Local Mode" and look forward to >> trying the runtime. I ran into a couple problems following your >> instructions. They are probably quite minor, but I am not a Python guy so I >> have no clue as to how to fix the problems. >> virtualenv -p python3 gives error: >> Already using interpreter /usr/bin/python3 >> You must provide a DEST_DIR >> So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't >> throw an error but I have no idea if that's correct. >> >> And finally, the moment of truth: >> $~/pgadmin4-2.0/runtime/pgAdmin4 >> Python path: "/home/rich/virtualenvs/pgadmi >> n4/lib/python3.5/site-packages/" >> Python Home: "" >> Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" >> Traceback (most recent call last): >> File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in >> import config >> File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in >> from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path >> File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in >> >> from flask import Flask, abort, request, current_app, session, url_for >> ImportError: No module named flask >> >> Rich >> >> >> >> >> >> >> >> >> >> >> >> On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: >> >>> As it was not very clearly documented anywhere, we would like to share >>> how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual >>> environment as a stand alone desktop application (without the use of a >>> browser!). >>> >>> PgAdmin 4 can be run in three ways: >>> >>> - Server Mode in a web interface >>> - Local Mode in a web interface >>> - Local Mode in a standalone/runtime environment >>> The difference between the web interface and the runtime environment, is >>> that for the first you require to work from a browser. Whereas with the >>> runtime environments it runs as any other application on your desktop. This >>> is achieved by using Qt5, which creates a wrapper of the application. This >>> is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't >>> pre-build. Installing PgAdmin 4 for a runtime environment is a bit more >>> tricky than the other two, mostly because up until now it was not very well >>> documented. Especially it was unclear which dependencies it has on Ubuntu >>> and which options it needs at startup. After following this guide, you >>> will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, >>> Linux Mint, or other Debian flavours. >>> >>> Please find the installation guide here: >>> https://humandata.associates/blog/data-engineering/installin >>> g-pgadmin-4-runtime-mode >>> >>> Hopefully someone can add the information to the pgadmin documentation >>> and even better turn this into one (or 3) debian packages... >>> >>> >> >> >> -- >> Richard W. Greenwood, PLS >> www.greenwoodmap.com >> > >

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
Richard Greenwood
Date:
Hi Floris, Thanks for the reply. I believe that I'm closer but still not quite there yet: $~/pgadmin4-2.0/runtime/pgAdmin4 Python path: "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/" Python Home: "" Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" Traceback (most recent call last): File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 67, in app = create_app() File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 343, in create_app driver.init_app(app) File "/home/rich/pgadmin4-2.0/web/pgadmin/utils/driver/__init__.py", line 40, in init_app DriverRegistry.load_drivers() File "/home/rich/pgadmin4-2.0/web/pgadmin/utils/driver/registry.py", line 88, in load_drivers module = import_module(module_name) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/home/rich/pgadmin4-2.0/web/pgadmin/utils/driver/psycopg2/__init__.py", line 23, in import psycopg2 File "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/psycopg2/__init__.py", line 50, in from psycopg2._psycopg import ( # noqa ImportError: No module named _psycopg If I'm reading that correctly then I'm missing psycopg. I did "locate psycopg" and it shows up under /usr/lib/python2.7/ Might it be that I'm missing it for Python3? Sorry, I don't know Python. Thanks, Rich On Thu, Nov 23, 2017 at 8:25 AM, F.Sluiter wrote: > Oops made the same mistake twice: this is the new python setup: > Can you please remove the virtualenvs folder: > > rm -rf ~/virtualenvs > > And than redo the updated "Python setup": > > pip3 install virtualenv > > mkdir ~/virtualenvs/ > > virtualenv -p python3 ~/virtualenvs/pgadmin4/ > > source ~/virtualenvs/pgadmin4/bin/activate > > That should do it: > > ~/pgadmin4-2.0/runtime/pgAdmin4 > > 2017-11-23 16:23 GMT+01:00 F.Sluiter : > >> Hi Rich, >> Thx for trying! Sorry but this was a formatting error in our write up >> which caused the python path to become mangled. We corrected that now so it >> should be ok for . >> Now to fix it for you: >> Can you please remove the virtualenvs folder: >> >> rm -rf ~/virtualenvs >> >> And than redo the updated "Python setup": >> >> pip3 install virtualenv >> >> mkdir ~/virtualenvs/ >> >> cd ~/virtualenvs/ >> >> virtualenv -p python3 >> >> pgadmin4 source pgadmin4/bin/activate >> >> pip3 install -r ~/pgadmin4-2.0/requirements.txt >> >> That should do it: >> >> ~/pgadmin4-2.0/runtime/pgAdmin4 >> >> Note that the first time it reports a few errors when creating the local >> config database, but those should go away the next time you start. >> Let us know if it worked, or if you encounter more errors! >> >> Cheers, >> Floris >> >> 2017-11-23 16:01 GMT+01:00 Richard Greenwood > >: >> >>> Thanks for the write up. I've been using "Local Mode" and look forward >>> to trying the runtime. I ran into a couple problems following your >>> instructions. They are probably quite minor, but I am not a Python guy so I >>> have no clue as to how to fix the problems. >>> virtualenv -p python3 gives error: >>> Already using interpreter /usr/bin/python3 >>> You must provide a DEST_DIR >>> So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't >>> throw an error but I have no idea if that's correct. >>> >>> And finally, the moment of truth: >>> $~/pgadmin4-2.0/runtime/pgAdmin4 >>> Python path: "/home/rich/virtualenvs/pgadmi >>> n4/lib/python3.5/site-packages/" >>> Python Home: "" >>> Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" >>> Traceback (most recent call last): >>> File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in >>> import config >>> File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in >>> from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path >>> File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in >>> >>> from flask import Flask, abort, request, current_app, session, >>> url_for >>> ImportError: No module named flask >>> >>> Rich >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: >>> >>>> As it was not very clearly documented anywhere, we would like to share >>>> how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual >>>> environment as a stand alone desktop application (without the use of a >>>> browser!). >>>> >>>> PgAdmin 4 can be run in three ways: >>>> >>>> - Server Mode in a web interface >>>> - Local Mode in a web interface >>>> - Local Mode in a standalone/runtime environment >>>> The difference between the web interface and the runtime environment, >>>> is that for the first you require to work from a browser. Whereas with the >>>> runtime environments it runs as any other application on your desktop. This >>>> is achieved by using Qt5, which creates a wrapper of the application. This >>>> is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't >>>> pre-build. Installing PgAdmin 4 for a runtime environment is a bit more >>>> tricky than the other two, mostly because up until now it was not very well >>>> documented. Especially it was unclear which dependencies it has on Ubuntu >>>> and which options it needs at startup. After following this guide, you >>>> will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, >>>> Linux Mint, or other Debian flavours. >>>> >>>> Please find the installation guide here: >>>> https://humandata.associates/blog/data-engineering/installin >>>> g-pgadmin-4-runtime-mode >>>> >>>> Hopefully someone can add the information to the pgadmin documentation >>>> and even better turn this into one (or 3) debian packages... >>>> >>>> >>> >>> >>> -- >>> Richard W. Greenwood, PLS >>> www.greenwoodmap.com >>> >> >> > -- Richard W. Greenwood, PLS www.greenwoodmap.com

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
Jason Wang
Date:
This is a blog I wrote re installing pg as a web service, your problem is probably related to Python PATH. http://aus800.com.au/deploy-pgadmin-as-a-web-service-under-venv-environment/ On Nov 24, 2017 02:01, "Richard Greenwood" wrote: Thanks for the write up. I've been using "Local Mode" and look forward to trying the runtime. I ran into a couple problems following your instructions. They are probably quite minor, but I am not a Python guy so I have no clue as to how to fix the problems. virtualenv -p python3 gives error: Already using interpreter /usr/bin/python3 You must provide a DEST_DIR So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't throw an error but I have no idea if that's correct. And finally, the moment of truth: $~/pgadmin4-2.0/runtime/pgAdmin4 Python path: "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/" Python Home: "" Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" Traceback (most recent call last): File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in import config File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in from flask import Flask, abort, request, current_app, session, url_for ImportError: No module named flask Rich On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: > As it was not very clearly documented anywhere, we would like to share how > best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual > environment as a stand alone desktop application (without the use of a > browser!). > > PgAdmin 4 can be run in three ways: > > - Server Mode in a web interface > - Local Mode in a web interface > - Local Mode in a standalone/runtime environment > The difference between the web interface and the runtime environment, is > that for the first you require to work from a browser. Whereas with the > runtime environments it runs as any other application on your desktop. This > is achieved by using Qt5, which creates a wrapper of the application. This > is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't > pre-build. Installing PgAdmin 4 for a runtime environment is a bit more > tricky than the other two, mostly because up until now it was not very well > documented. Especially it was unclear which dependencies it has on Ubuntu > and which options it needs at startup. After following this guide, you > will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, > Linux Mint, or other Debian flavours. > > Please find the installation guide here: > https://humandata.associates/blog/data-engineering/installin > g-pgadmin-4-runtime-mode > > Hopefully someone can add the information to the pgadmin documentation and > even better turn this into one (or 3) debian packages... > > -- Richard W. Greenwood, PLS www.greenwoodmap.com

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
Victor Milewski
Date:
Hi Rich, This was another error resulting as an after effect from the formatting error on our blog. The python2 and python3 libraries got mixed up while building pgAdmin 4. Can you try and redo the whole process again? First make sure the virtual environment is not active and remove both the virtual environment and the pgAdmin4 directories: deactivate sudo rm -rf ~/virtualenvs/ sudo rm -rf ~/pgadmin4-2.0/ sudo rm -rf ~/.config/pgadmin/ sudo rm -rf ~/.pgadmin/ now follow the steps at https://humandata.associates/blog/data-engineering/installing-pgadmin-4-runtime-mode I hope everything will work now, please let us know! Best, Victor On Nov 24, 2017 02:01, "Richard Greenwood" > wrote: > > Thanks for the write up. I've been using "Local Mode" and look forward to > trying the runtime. I ran into a couple problems following your > instructions. They are probably quite minor, but I am not a Python guy so I > have no clue as to how to fix the problems. > virtualenv -p python3 gives error: > Already using interpreter /usr/bin/python3 > You must provide a DEST_DIR > So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't > throw an error but I have no idea if that's correct. > > And finally, the moment of truth: > $~/pgadmin4-2.0/runtime/pgAdmin4 > Python path: > "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/" > Python Home: "" > Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" > Traceback (most recent call last): > File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in > import config > File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in > from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path > File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in > > from flask import Flask, abort, request, current_app, session, url_for > ImportError: No module named flask > > Rich > > > > > > > > > > > > On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: > >> As it was not very clearly documented anywhere, we would like to share >> how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual >> environment as a stand alone desktop application (without the use of a >> browser!). >> >> PgAdmin 4 can be run in three ways: >> >> - Server Mode in a web interface >> - Local Mode in a web interface >> - Local Mode in a standalone/runtime environment >> The difference between the web interface and the runtime environment, is >> that for the first you require to work from a browser. Whereas with the >> runtime environments it runs as any other application on your desktop. This >> is achieved by using Qt5, which creates a wrapper of the application. This >> is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't >> pre-build. Installing PgAdmin 4 for a runtime environment is a bit more >> tricky than the other two, mostly because up until now it was not very well >> documented. Especially it was unclear which dependencies it has on Ubuntu >> and which options it needs at startup. After following this guide, you >> will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, >> Linux Mint, or other Debian flavours. >> >> Please find the installation guide here: >> >> https://humandata.associates/blog/data-engineering/installing-pgadmin-4-runtime-mode >> >> Hopefully someone can add the information to the pgadmin documentation >> and even better turn this into one (or 3) debian packages... >> >> > > > -- > Richard W. Greenwood, PLS > www.greenwoodmap.com > > >

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
Victor Milewski
Date:
Hi Rich, This was another error resulting as an after effect from the formatting error on our blog. The python2 and python3 libraries got mixed up while building pgAdmin 4. Can you try and redo the whole process again? First make sure the virtual environment is not active and remove both the virtual environment and the pgAdmin4 directories: deactivate sudo rm -rf ~/virtualenvs/ sudo rm -rf ~/pgadmin4-2.0/ sudo rm -rf ~/.config/pgadmin/ sudo rm -rf ~/.pgadmin/ now follow the steps at https://humandata.associates/blog/data-engineering/installing-pgadmin-4-runtime-mode I hope everything will work now, please let us know! Best, Victor Op do 23 nov. 2017 om 20:12 schreef Richard Greenwood < richard.greenwood@gmail.com>: > Hi Floris, > > Thanks for the reply. I believe that I'm closer but still not quite there > yet: > > $~/pgadmin4-2.0/runtime/pgAdmin4 > Python path: > "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/" > Python Home: "" > Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" > Traceback (most recent call last): > File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 67, in > app = create_app() > File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 343, in > create_app > driver.init_app(app) > File "/home/rich/pgadmin4-2.0/web/pgadmin/utils/driver/__init__.py", > line 40, in init_app > DriverRegistry.load_drivers() > File "/home/rich/pgadmin4-2.0/web/pgadmin/utils/driver/registry.py", > line 88, in load_drivers > module = import_module(module_name) > File "/usr/lib/python2.7/importlib/__init__.py", line 37, in > import_module > __import__(name) > File > "/home/rich/pgadmin4-2.0/web/pgadmin/utils/driver/psycopg2/__init__.py", > line 23, in > import psycopg2 > File > "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/psycopg2/__init__.py", > line 50, in > from psycopg2._psycopg import ( # noqa > ImportError: No module named _psycopg > > If I'm reading that correctly then I'm missing psycopg. I did "locate > psycopg" and it shows up under /usr/lib/python2.7/ > Might it be that I'm missing it for Python3? Sorry, I don't know Python. > > Thanks, > Rich > > > On Thu, Nov 23, 2017 at 8:25 AM, F.Sluiter wrote: > >> Oops made the same mistake twice: this is the new python setup: >> Can you please remove the virtualenvs folder: >> >> rm -rf ~/virtualenvs >> >> And than redo the updated "Python setup": >> >> pip3 install virtualenv >> >> mkdir ~/virtualenvs/ >> >> virtualenv -p python3 ~/virtualenvs/pgadmin4/ >> >> source ~/virtualenvs/pgadmin4/bin/activate >> >> That should do it: >> >> ~/pgadmin4-2.0/runtime/pgAdmin4 >> >> 2017-11-23 16:23 GMT+01:00 F.Sluiter : >> >>> Hi Rich, >>> Thx for trying! Sorry but this was a formatting error in our write up >>> which caused the python path to become mangled. We corrected that now so it >>> should be ok for . >>> Now to fix it for you: >>> Can you please remove the virtualenvs folder: >>> >>> rm -rf ~/virtualenvs >>> >>> And than redo the updated "Python setup": >>> >>> pip3 install virtualenv >>> >>> mkdir ~/virtualenvs/ >>> >>> cd ~/virtualenvs/ >>> >>> virtualenv -p python3 >>> >>> pgadmin4 source pgadmin4/bin/activate >>> >>> pip3 install -r ~/pgadmin4-2.0/requirements.txt >>> >>> That should do it: >>> >>> ~/pgadmin4-2.0/runtime/pgAdmin4 >>> >>> Note that the first time it reports a few errors when creating the local >>> config database, but those should go away the next time you start. >>> Let us know if it worked, or if you encounter more errors! >>> >>> Cheers, >>> Floris >>> >>> 2017-11-23 16:01 GMT+01:00 Richard Greenwood < >>> richard.greenwood@gmail.com>: >>> >>>> Thanks for the write up. I've been using "Local Mode" and look forward >>>> to trying the runtime. I ran into a couple problems following your >>>> instructions. They are probably quite minor, but I am not a Python guy so I >>>> have no clue as to how to fix the problems. >>>> virtualenv -p python3 gives error: >>>> Already using interpreter /usr/bin/python3 >>>> You must provide a DEST_DIR >>>> So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't >>>> throw an error but I have no idea if that's correct. >>>> >>>> And finally, the moment of truth: >>>> $~/pgadmin4-2.0/runtime/pgAdmin4 >>>> Python path: >>>> "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/" >>>> Python Home: "" >>>> Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" >>>> Traceback (most recent call last): >>>> File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in >>>> import config >>>> File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in >>>> from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path >>>> File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in >>>> >>>> from flask import Flask, abort, request, current_app, session, >>>> url_for >>>> ImportError: No module named flask >>>> >>>> Rich >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: >>>> >>>>> As it was not very clearly documented anywhere, we would like to share >>>>> how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual >>>>> environment as a stand alone desktop application (without the use of a >>>>> browser!). >>>>> >>>>> PgAdmin 4 can be run in three ways: >>>>> >>>>> - Server Mode in a web interface >>>>> - Local Mode in a web interface >>>>> - Local Mode in a standalone/runtime environment >>>>> The difference between the web interface and the runtime environment, >>>>> is that for the first you require to work from a browser. Whereas with the >>>>> runtime environments it runs as any other application on your desktop. This >>>>> is achieved by using Qt5, which creates a wrapper of the application. This >>>>> is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't >>>>> pre-build. Installing PgAdmin 4 for a runtime environment is a bit more >>>>> tricky than the other two, mostly because up until now it was not very well >>>>> documented. Especially it was unclear which dependencies it has on Ubuntu >>>>> and which options it needs at startup. After following this guide, you >>>>> will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, >>>>> Linux Mint, or other Debian flavours. >>>>> >>>>> Please find the installation guide here: >>>>> >>>>> https://humandata.associates/blog/data-engineering/installing-pgadmin-4-runtime-mode >>>>> >>>>> Hopefully someone can add the information to the pgadmin documentation >>>>> and even better turn this into one (or 3) debian packages... >>>>> >>>>> >>>> >>>> >>>> -- >>>> Richard W. Greenwood, PLS >>>> www.greenwoodmap.com >>>> >>> >>> >> > > > -- > Richard W. Greenwood, PLS > www.greenwoodmap.com >

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
Richard Greenwood
Date:
All - Thanks for your replies. Following the revised instructions I still had one remaining error: ERROR pgadmin: The desktop user pgadmin4@pgadmin.org was not found in the configuration database. I assume this is because I have previously setup the local web mode. So in ~/pgadmin4-2.0/web/config.py I changed DESKTOP_USER = 'pgadmin4@pgadmin.org ' to the user that I had previously used in the standalone web interface. All good now. Thanks for all the help. I'm sure many others will find your instructions to be very helpful. Best regards, Rich On Fri, Nov 24, 2017 at 6:26 AM, Victor Milewski wrote: > Hi Rich, > > This was another error resulting as an after effect from the formatting > error on our blog. The python2 and python3 libraries got mixed up while > building pgAdmin 4. Can you try and redo the whole process again? First > make sure the virtual environment is not active and remove both the virtual > environment and the pgAdmin4 directories: > > deactivate > sudo rm -rf ~/virtualenvs/ > sudo rm -rf ~/pgadmin4-2.0/ > sudo rm -rf ~/.config/pgadmin/ > sudo rm -rf ~/.pgadmin/ > > now follow the steps at > https://humandata.associates/blog/data-engineering/ > installing-pgadmin-4-runtime-mode > > I hope everything will work now, please let us know! > Best, > Victor > > On Nov 24, 2017 02:01, "Richard Greenwood" >> wrote: >> >> Thanks for the write up. I've been using "Local Mode" and look forward to >> trying the runtime. I ran into a couple problems following your >> instructions. They are probably quite minor, but I am not a Python guy so I >> have no clue as to how to fix the problems. >> virtualenv -p python3 gives error: >> Already using interpreter /usr/bin/python3 >> You must provide a DEST_DIR >> So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't >> throw an error but I have no idea if that's correct. >> >> And finally, the moment of truth: >> $~/pgadmin4-2.0/runtime/pgAdmin4 >> Python path: "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/" >> >> Python Home: "" >> Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" >> Traceback (most recent call last): >> File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in >> import config >> File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in >> from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path >> File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in >> >> from flask import Flask, abort, request, current_app, session, url_for >> ImportError: No module named flask >> >> Rich >> >> >> >> >> >> >> >> >> >> >> >> On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: >> >>> As it was not very clearly documented anywhere, we would like to share >>> how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual >>> environment as a stand alone desktop application (without the use of a >>> browser!). >>> >>> PgAdmin 4 can be run in three ways: >>> >>> - Server Mode in a web interface >>> - Local Mode in a web interface >>> - Local Mode in a standalone/runtime environment >>> The difference between the web interface and the runtime environment, is >>> that for the first you require to work from a browser. Whereas with the >>> runtime environments it runs as any other application on your desktop. This >>> is achieved by using Qt5, which creates a wrapper of the application. This >>> is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't >>> pre-build. Installing PgAdmin 4 for a runtime environment is a bit more >>> tricky than the other two, mostly because up until now it was not very well >>> documented. Especially it was unclear which dependencies it has on Ubuntu >>> and which options it needs at startup. After following this guide, you >>> will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, >>> Linux Mint, or other Debian flavours. >>> >>> Please find the installation guide here: >>> https://humandata.associates/blog/data-engineering/ >>> installing-pgadmin-4-runtime-mode >>> >>> Hopefully someone can add the information to the pgadmin documentation >>> and even better turn this into one (or 3) debian packages... >>> >>> >> >> >> -- >> Richard W. Greenwood, PLS >> www.greenwoodmap.com >> >> >> -- Richard W. Greenwood, PLS www.greenwoodmap.com

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
Dave Page
Date:
Hi We don’t advise changing config.py as an upgrade will overwrite it. Instead, create a file called config_local.py in the same directory, and put the change in there. That file (if present) is read after config.py and can override the defaults. Thanks for the helpful blogs guys! -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK:http://www.enterprisedb.com The Enterprise PostgreSQL Company > On 24 Nov 2017, at 18:28, Richard Greenwood wrote: > > All - > > Thanks for your replies. Following the revised instructions I still had one remaining error: > > ERROR pgadmin: The desktop user pgadmin4@pgadmin.org was not found in the configuration database. > > I assume this is because I have previously setup the local web mode. So in ~/pgadmin4-2.0/web/config.py I changed DESKTOP_USER = 'pgadmin4@pgadmin.org' to the user that I had previously used in the standalone web interface. > > All good now. Thanks for all the help. I'm sure many others will find your instructions to be very helpful. > > Best regards, > Rich > > > >> On Fri, Nov 24, 2017 at 6:26 AM, Victor Milewski wrote: >> Hi Rich, >> >> This was another error resulting as an after effect from the formatting error on our blog. The python2 and python3 libraries got mixed up while building pgAdmin 4. Can you try and redo the whole process again? First make sure the virtual environment is not active and remove both the virtual environment and the pgAdmin4 directories: >> >> deactivate >> sudo rm -rf ~/virtualenvs/ >> sudo rm -rf ~/pgadmin4-2.0/ >> sudo rm -rf ~/.config/pgadmin/ >> sudo rm -rf ~/.pgadmin/ >> >> now follow the steps at >> https://humandata.associates/blog/data-engineering/installing-pgadmin-4-runtime-mode >> >> I hope everything will work now, please let us know! >> Best, >> Victor >> >>> On Nov 24, 2017 02:01, "Richard Greenwood" wrote: >>> Thanks for the write up. I've been using "Local Mode" and look forward to trying the runtime. I ran into a couple problems following your instructions. They are probably quite minor, but I am not a Python guy so I have no clue as to how to fix the problems. >>> virtualenv -p python3 gives error: >>> Already using interpreter /usr/bin/python3 >>> You must provide a DEST_DIR >>> So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't throw an error but I have no idea if that's correct. >>> >>> And finally, the moment of truth: >>> $~/pgadmin4-2.0/runtime/pgAdmin4 >>> Python path: "/home/rich/virtualenvs/pgadmin4/lib/python3.5/site-packages/" >>> Python Home: "" >>> Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" >>> Traceback (most recent call last): >>> File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in >>> import config >>> File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in >>> from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path >>> File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in >>> from flask import Flask, abort, request, current_app, session, url_for >>> ImportError: No module named flask >>> >>> Rich >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>>> On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: >>>> As it was not very clearly documented anywhere, we would like to share how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual environment as a stand alone desktop application (without the use of a browser!). >>>> >>>> PgAdmin 4 can be run in three ways: >>>> >>>> - Server Mode in a web interface >>>> - Local Mode in a web interface >>>> - Local Mode in a standalone/runtime environment >>>> The difference between the web interface and the runtime environment, is that for the first you require to work from a browser. Whereas with the runtime environments it runs as any other application on your desktop. This is achieved by using Qt5, which creates a wrapper of the application. This is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't pre-build. Installing PgAdmin 4 for a runtime environment is a bit more tricky than the other two, mostly because up until now it was not very well documented. Especially it was unclear which dependencies it has on Ubuntu and which options it needs at startup. After following this guide, you will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, Linux Mint, or other Debian flavours. >>>> >>>> Please find the installation guide here: >>>> https://humandata.associates/blog/data-engineering/installing-pgadmin-4-runtime-mode >>>> >>>> Hopefully someone can add the information to the pgadmin documentation and even better turn this into one (or 3) debian packages... >>>> >>> >>> >>> >>> -- >>> Richard W. Greenwood, PLS >>> www.greenwoodmap.com >>> > > > > -- > Richard W. Greenwood, PLS > www.greenwoodmap.com

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
"F.Sluiter"
Date:
Hi Dave, thank you for all the work you put in, we use pgadmin as our daily tool. For us it wasn't immediately clear from the docs how to run pgadmin as a real desktop application ornthat it can be run in 3 different ways (great concept by the way). Because of our security policies, it is difficult to install webservice type apps, so running in standalone mode is very important in our case. If you like, you may use our work (in part or whole) and add it to the official documentation, so it will get the place were it should be. And hopefully someone can create official .deb packages now the dependencies are documented! Kind regards Floris Sluiter Human Data Associates On Nov 24, 2017 20:31, "Dave Page" wrote: > Hi > > We don’t advise changing config.py as an upgrade will overwrite it. > Instead, create a file called config_local.py in the same directory, and > put the change in there. That file (if present) is read after config.py and > can override the defaults. > > Thanks for the helpful blogs guys! > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK:http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > On 24 Nov 2017, at 18:28, Richard Greenwood > wrote: > > All - > > Thanks for your replies. Following the revised instructions I still had > one remaining error: > > ERROR pgadmin: The desktop user pgadmin4@pgadmin.org was not found > in the configuration database. > > I assume this is because I have previously setup the local web mode. So in > ~/pgadmin4-2.0/web/config.py I changed DESKTOP_USER = ' > pgadmin4@pgadmin.org' to the user that I had previously used in the > standalone web interface. > > All good now. Thanks for all the help. I'm sure many others will find your > instructions to be very helpful. > > Best regards, > Rich > > > > On Fri, Nov 24, 2017 at 6:26 AM, Victor Milewski > wrote: > >> Hi Rich, >> >> This was another error resulting as an after effect from the formatting >> error on our blog. The python2 and python3 libraries got mixed up while >> building pgAdmin 4. Can you try and redo the whole process again? First >> make sure the virtual environment is not active and remove both the virtual >> environment and the pgAdmin4 directories: >> >> deactivate >> sudo rm -rf ~/virtualenvs/ >> sudo rm -rf ~/pgadmin4-2.0/ >> sudo rm -rf ~/.config/pgadmin/ >> sudo rm -rf ~/.pgadmin/ >> >> now follow the steps at >> https://humandata.associates/blog/data-engineering/installin >> g-pgadmin-4-runtime-mode >> >> I hope everything will work now, please let us know! >> Best, >> Victor >> >> On Nov 24, 2017 02:01, "Richard Greenwood" >>> wrote: >>> >>> Thanks for the write up. I've been using "Local Mode" and look forward >>> to trying the runtime. I ran into a couple problems following your >>> instructions. They are probably quite minor, but I am not a Python guy so I >>> have no clue as to how to fix the problems. >>> virtualenv -p python3 gives error: >>> Already using interpreter /usr/bin/python3 >>> You must provide a DEST_DIR >>> So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't >>> throw an error but I have no idea if that's correct. >>> >>> And finally, the moment of truth: >>> $~/pgadmin4-2.0/runtime/pgAdmin4 >>> Python path: "/home/rich/virtualenvs/pgadmi >>> n4/lib/python3.5/site-packages/" >>> Python Home: "" >>> Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" >>> Traceback (most recent call last): >>> File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in >>> import config >>> File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in >>> from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path >>> File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in >>> >>> from flask import Flask, abort, request, current_app, session, >>> url_for >>> ImportError: No module named flask >>> >>> Rich >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: >>> >>>> As it was not very clearly documented anywhere, we would like to share >>>> how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual >>>> environment as a stand alone desktop application (without the use of a >>>> browser!). >>>> >>>> PgAdmin 4 can be run in three ways: >>>> >>>> - Server Mode in a web interface >>>> - Local Mode in a web interface >>>> - Local Mode in a standalone/runtime environment >>>> The difference between the web interface and the runtime environment, >>>> is that for the first you require to work from a browser. Whereas with the >>>> runtime environments it runs as any other application on your desktop. This >>>> is achieved by using Qt5, which creates a wrapper of the application. This >>>> is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't >>>> pre-build. Installing PgAdmin 4 for a runtime environment is a bit more >>>> tricky than the other two, mostly because up until now it was not very well >>>> documented. Especially it was unclear which dependencies it has on Ubuntu >>>> and which options it needs at startup. After following this guide, you >>>> will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, >>>> Linux Mint, or other Debian flavours. >>>> >>>> Please find the installation guide here: >>>> https://humandata.associates/blog/data-engineering/installin >>>> g-pgadmin-4-runtime-mode >>>> >>>> Hopefully someone can add the information to the pgadmin documentation >>>> and even better turn this into one (or 3) debian packages... >>>> >>>> >>> >>> >>> -- >>> Richard W. Greenwood, PLS >>> www.greenwoodmap.com >>> >>> >>> > > > -- > Richard W. Greenwood, PLS > www.greenwoodmap.com > >

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
Dave Page
Date:
Hi On Fri, Nov 24, 2017 at 7:56 PM, F.Sluiter wrote: > Hi Dave, thank you for all the work you put in, we use pgadmin as our > daily tool. > For us it wasn't immediately clear from the docs how to run pgadmin as a > real desktop application ornthat it can be run in 3 different ways (great > concept by the way). Because of our security policies, it is difficult to > install webservice type apps, so running in standalone mode is very > important in our case. > Yeah, the assumption was always that packagers would deal with that problem with guidance from us, and end-users wouldn't have to. Unfortunately the guys working on the Ubuntu/Debian packages haven't been able to complete them yet. > If you like, you may use our work (in part or whole) and add it to the > official documentation, so it will get the place were it should be. And > hopefully someone can create official .deb packages now the dependencies > are documented! > Thanks - I've added an item to my todo to improve that part of the docs. > > Kind regards > Floris Sluiter > Human Data Associates > > > On Nov 24, 2017 20:31, "Dave Page" wrote: > >> Hi >> >> We don’t advise changing config.py as an upgrade will overwrite it. >> Instead, create a file called config_local.py in the same directory, and >> put the change in there. That file (if present) is read after config.py and >> can override the defaults. >> >> Thanks for the helpful blogs guys! >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK:http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> On 24 Nov 2017, at 18:28, Richard Greenwood >> wrote: >> >> All - >> >> Thanks for your replies. Following the revised instructions I still had >> one remaining error: >> >> ERROR pgadmin: The desktop user pgadmin4@pgadmin.org was not >> found in the configuration database. >> >> I assume this is because I have previously setup the local web mode. So >> in ~/pgadmin4-2.0/web/config.py I changed DESKTOP_USER = ' >> pgadmin4@pgadmin.org' to the user that I had previously used in the >> standalone web interface. >> >> All good now. Thanks for all the help. I'm sure many others will find >> your instructions to be very helpful. >> >> Best regards, >> Rich >> >> >> >> On Fri, Nov 24, 2017 at 6:26 AM, Victor Milewski < >> victormilewski@gmail.com> wrote: >> >>> Hi Rich, >>> >>> This was another error resulting as an after effect from the formatting >>> error on our blog. The python2 and python3 libraries got mixed up while >>> building pgAdmin 4. Can you try and redo the whole process again? First >>> make sure the virtual environment is not active and remove both the virtual >>> environment and the pgAdmin4 directories: >>> >>> deactivate >>> sudo rm -rf ~/virtualenvs/ >>> sudo rm -rf ~/pgadmin4-2.0/ >>> sudo rm -rf ~/.config/pgadmin/ >>> sudo rm -rf ~/.pgadmin/ >>> >>> now follow the steps at >>> https://humandata.associates/blog/data-engineering/installin >>> g-pgadmin-4-runtime-mode >>> >>> I hope everything will work now, please let us know! >>> Best, >>> Victor >>> >>> On Nov 24, 2017 02:01, "Richard Greenwood" >>>> wrote: >>>> >>>> Thanks for the write up. I've been using "Local Mode" and look forward >>>> to trying the runtime. I ran into a couple problems following your >>>> instructions. They are probably quite minor, but I am not a Python guy so I >>>> have no clue as to how to fix the problems. >>>> virtualenv -p python3 gives error: >>>> Already using interpreter /usr/bin/python3 >>>> You must provide a DEST_DIR >>>> So I tried virtualenv -p python3 ~/virtualenvs/ which at least doesn't >>>> throw an error but I have no idea if that's correct. >>>> >>>> And finally, the moment of truth: >>>> $~/pgadmin4-2.0/runtime/pgAdmin4 >>>> Python path: "/home/rich/virtualenvs/pgadmi >>>> n4/lib/python3.5/site-packages/" >>>> Python Home: "" >>>> Webapp path: "/home/rich/pgadmin4-2.0/web/pgAdmin4.py" >>>> Traceback (most recent call last): >>>> File "/home/rich/pgadmin4-2.0/web/pgAdmin4.py", line 34, in >>>> import config >>>> File "/home/rich/pgadmin4-2.0/web/config.py", line 30, in >>>> from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path >>>> File "/home/rich/pgadmin4-2.0/web/pgadmin/__init__.py", line 17, in >>>> >>>> from flask import Flask, abort, request, current_app, session, >>>> url_for >>>> ImportError: No module named flask >>>> >>>> Rich >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Thu, Nov 23, 2017 at 5:46 AM, F.Sluiter wrote: >>>> >>>>> As it was not very clearly documented anywhere, we would like to share >>>>> how best to install PGadmin 4 on linux Mint and Ubuntu 16.04 in a virtual >>>>> environment as a stand alone desktop application (without the use of a >>>>> browser!). >>>>> >>>>> PgAdmin 4 can be run in three ways: >>>>> >>>>> - Server Mode in a web interface >>>>> - Local Mode in a web interface >>>>> - Local Mode in a standalone/runtime environment >>>>> The difference between the web interface and the runtime environment, >>>>> is that for the first you require to work from a browser. Whereas with the >>>>> runtime environments it runs as any other application on your desktop. This >>>>> is achieved by using Qt5, which creates a wrapper of the application. This >>>>> is a feature provided by the pgAdmin 4 team. However, on Ubuntu it wasn't >>>>> pre-build. Installing PgAdmin 4 for a runtime environment is a bit more >>>>> tricky than the other two, mostly because up until now it was not very well >>>>> documented. Especially it was unclear which dependencies it has on Ubuntu >>>>> and which options it needs at startup. After following this guide, you >>>>> will be able to run pgAdmin 4 in any of the three options on Ubuntu 16.04, >>>>> Linux Mint, or other Debian flavours. >>>>> >>>>> Please find the installation guide here: >>>>> https://humandata.associates/blog/data-engineering/installin >>>>> g-pgadmin-4-runtime-mode >>>>> >>>>> Hopefully someone can add the information to the pgadmin documentation >>>>> and even better turn this into one (or 3) debian packages... >>>>> >>>>> >>>> >>>> >>>> -- >>>> Richard W. Greenwood, PLS >>>> www.greenwoodmap.com >>>> >>>> >>>> >> >> >> -- >> Richard W. Greenwood, PLS >> www.greenwoodmap.com >> >> -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: Installing pgAdmin 4 in Runtime Mode (stand alone) in Linux

From
Willy-Bas Loos
Date:
wow this works.
thanks Floris and Victor


--
Willy-Bas Loos