1

I am pretty sure that I am missing something naive. I tried to look up for the solution online but seems like I couldn't find it either.

I am trying to install pgadmin4 on Ubuntu 16.04 LTS. I have installed miniconda2 following instructions here. Then I tried to install pgadmin4 following instructions here.

First I was getting an error:

ImportError: No module named flask

when I tried to run

sudo python ~/miniconda2/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py

But I was successfully able to python -c "import flask" from terminal.

Then I resolved it by installing

sudo apt-get install python-flask

But now if I try to run pgAdmin4.py it gives me following error:

ImportError: No module named flask_babel

and again I am successfully able to import it if I run following command.

python -c "import flask_babel"

I am not sure what I am missing, any help would be really appreciated.

Edit

Okay, so I removed that error by installing

sudo apt-get install python-flask-babel (Thanks to Peter Wood's comment)

Now I am getting another error:

ImportError: No module named flask_htmlmin

And I guess I can resolve this too in the same pattern, but my confusion is why those imports works when I do from terminal (inline python or even if I just run python from terminal and import it by myself) and why it doesn't work when I run the script (i.e. pgAdmin4.py in this case).

Muaz Usmani
  • 1,298
  • 6
  • 26
  • 48

0 Answers0