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
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.
If you are using virtualenv to run pgAdmin4 then you need to activate it first,
Refer Apache mine wsgi file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With