I'm trying to install pgAdmin4 from its source code on WSL 2 (running Ubuntu 22.04 (Jammy Jellyfish) distribution), and I've been following the steps in the README
document in pgAdmin4's GitHub repository.
To configure the Python environment, I've successfully completed steps 1 to 5. Now, I'm trying to run the initial setup of the database configuration using:
(venv) hallixon@PC:~/pgadmin4$ sudo python3 web/setup.py
or
(venv) hallixon@PC:~/pgadmin4$ sudo python3 web/pgAdmin4.py
But both commands throw the following error:
Traceback (most recent call last):
File "/home/hallixon/pgadmin4/web/pgAdmin4.py", line 49, in <module>
import config
File "/home/hallixon/pgadmin4/web/config.py", line 32, in <module>
from pgadmin.utils import env, IS_WIN, fs_short_path
File "/home/hallixon/pgadmin4/web/pgadmin/__init__.py", line 24, in <module>
from flask import Flask, abort, request, current_app, session, url_for
ModuleNotFoundError: No module named 'flask'
Meanwhile, running the following script to show the list of modules installed in the current virtual environment (venv) returns flask
in the list.
>>> help('modules')
Please, how can I solve this? I'd also appreciate links to articles showing how to install pgAdmin4 from its source code on WSL 2 (Ubuntu distribution, preferably).