Reputation: 389
I have search similar error in StackOverflow, but its different than mine. I tried to install pgadmin4 on ubuntu with virtualenv, everything went fine until I tried to run it with following command :
cd pgadmin4
source bin/activate
sudo python ~/pgadmin4/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
It raises an error saying :
ImportError: No module named flask
I have flash installed. Running pip show flask under the virtualenv will show :
Name: Flask
Version: 0.11.1
Summary: A microframework based on Werkzeug, Jinja2 and good intentions
Home-page: http://github.com/pallets/flask/
Author: Armin Ronacher
Author-email: [email protected]
License: BSD
Location: /home/myname/pgadmin4/lib/python2.7/site-packages
Requires: itsdangerous, click, Werkzeug, Jinja2
Any idea what is wrong?
Thank you,
Upvotes: 2
Views: 11071
Reputation: 389
The issue was somehow it tries to get flask on my system rather than on virtualenv. So i just installed flask on my system, and it works.
Upvotes: 0
Reputation: 6007
Provide proper permission to directory by following command,
sudo mkdir "/var/log/pgadmin"
sudo chmod a+wrx "/var/log/pgadmin"
sudo mkdir "/var/lib/pgadmin"
sudo chmod a+wrx "/var/lib/pgadmin"
And then run the pgAdmin4 without sudo
cd pgadmin4
source bin/activate
python ~/pgadmin4/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
Upvotes: 11