I'm trying to install pgadmin4
on Arch Linux.
Here is what I did:
sudo pacman -S pgadmin4
Then I simply tried running pgadmin4
and got the following error:
"An error occurred initialising the pgAdmin 4 server:\n\nFailed to launch the application server, server thread exiting."
Then, I tried running pgAdmin4.py
directly:
sudo python3 /usr/lib/pgadmin4/web/pgAdmin4.py
And I got an error with the following stacktrace:
Traceback (most recent call last):
File "/usr/lib/pgadmin4/web/pgAdmin4.py", line 35, in <module>
import config
File "/usr/lib/pgadmin4/web/config.py", line 25, in <module>
from pgadmin.utils import env, IS_WIN, fs_short_path
File "/usr/lib/pgadmin4/web/pgadmin/__init__.py", line 28, in <module>
from flask_security import Security, SQLAlchemyUserDatastore, current_user
File "/usr/lib/python3.9/site-packages/flask_security/__init__.py", line 15, in <module>
from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
File "/usr/lib/python3.9/site-packages/flask_security/core.py", line 48, in <module>
from .mail_util import MailUtil
File "/usr/lib/python3.9/site-packages/flask_security/mail_util.py", line 14, in <module>
import email_validator
ModuleNotFoundError: No module named 'email_validator'
I then tried to install pip
in an attempt to install the missing module myself:
sudo pacman -S python-pip
Then:
pip install email_validator
However, the error remains. Should I modify my PATH
variable? What am I doing wrong?
EDIT
So, after some help from the comments, and some more searching, I modified the ~/.config/pgadmin/pgadmin4.conf
file to have the following PythonPath=/usr/lib/python3.9/site-packages:/usr/lib/python3.9:/home/ddimitrov/.local/lib/python3.9/site-packages
, which "resolved" this error but I was greeted with a brand new error:
Traceback (most recent call last):
File "/usr/lib/pgadmin4/web/pgAdmin4.py", line 94, in <module>
app = create_app()
File "/usr/lib/pgadmin4/web/pgadmin/__init__.py", line 347, in create_app
if not os.path.exists(SQLITE_PATH) or get_version() == -1:
File "/usr/lib/pgadmin4/web/pgadmin/setup/db_version.py", line 19, in get_version
return version.value
AttributeError: 'NoneType' object has no attribute 'value'
I tried since to reinstall pgadmin4
multiple times, same issue. Any help would be much appreciated.