Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pgadmin4 - New install not working

I downloaded the postgresql-9.6.0-1-linux-x64.run package and ran through the installer on ubuntu 16.04. Postgres is working fine. I am trying to use the pgadmin4 package that was included with this installer. I created a site in Apache per the instructions.

This is the error I am getting in the server.log file in Apache. Not sure how to fix this.

   Traceback (most recent call last):

File "/opt/PostgreSQL/9.6/pgAdmin4/web/pgAdmin4.wsgi", line 8, in <module>
     from pgAdmin4 import app as application

File "/opt/PostgreSQL/9.6/pgAdmin4/web/pgAdmin4.py", line 24, in <module>
     from pgadmin import create_app

File "/opt/PostgreSQL/9.6/pgAdmin4/web/pgadmin/__init__.py", line 18, in <module>

  from flask_babel import Babel, gettext

ImportError: No module named flask_babel
like image 771
pluto Avatar asked Jul 06 '26 19:07

pluto


2 Answers

This error message shows that your environment is missing a package called flask_babel. To install it, switch to the virtualenv your webserver uses and install it with this command:

pip install flask_babel

If you are not using any virtual environment for your python scripts, you have to prepend sudo to the command. But you should really consider using a virtualenv for your projects.

like image 134
n2o Avatar answered Jul 08 '26 08:07

n2o


If you are using virtualenv to run pgAdmin4 then you need to activate it first, Refer Apache mine wsgi file.enter image description here

like image 45
Murtuza Z Avatar answered Jul 08 '26 10:07

Murtuza Z



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!