无法启动pgadmin4 python应用程序

时间:2018-02-18 19:23:11

标签: python-3.x pgadmin

我遗漏了一些东西,我已经下载了pgadmin4 webapp,并尝试在其环境中启动它:

(pgadmin) denis ~/anaconda3/envs/pgadmin/lib/python3.5/site-packages/pgadmin4 $ pip install flask_babel
Requirement already satisfied: flask_babel in /home/denis/anaconda3/envs/pgadmin/lib/python3.5/site-packages
Requirement already satisfied: Jinja2>=2.5 in /home/denis/anaconda3/envs/pgadmin/lib/python3.5/site-packages (from flask_babel)
Requirement already satisfied: Babel>=2.3 in /home/denis/anaconda3/envs/pgadmin/lib/python3.5/site-packages (from flask_babel)
Requirement already satisfied: Flask in /home/denis/anaconda3/envs/pgadmin/lib/python3.5/site-packages (from flask_babel)
Requirement already satisfied: markupsafe in /home/denis/anaconda3/envs/pgadmin/lib/python3.5/site-packages (from Jinja2>=2.5->flask_babel)
Requirement already satisfied: pytz>=0a in /home/denis/anaconda3/envs/pgadmin/lib/python3.5/site-packages (from Babel>=2.3->flask_babel)
Requirement already satisfied: itsdangerous>=0.21 in /home/denis/.local/lib/python3.5/site-packages (from Flask->flask_babel)
Requirement already satisfied: Werkzeug>=0.7 in /home/denis/anaconda3/envs/pgadmin/lib/python3.5/site-packages (from Flask->flask_babel)
(pgadmin) denis ~/anaconda3/envs/pgadmin/lib/python3.5/site-packages/pgadmin4 $ sudo python pgAdmin4.py
Traceback (most recent call last):
  File "pgAdmin4.py", line 34, in <module>
    import config
  File "/home/denis/anaconda3/envs/pgadmin/lib/python3.5/site-packages/pgadmin4/config.py", line 30, in <module>
    from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path
  File "/home/denis/anaconda3/envs/pgadmin/lib/python3.5/site-packages/pgadmin4/pgadmin/__init__.py", line 18, in <module>
    from flask_babel import Babel, gettext
ImportError: No module named flask_babel

source activate pgadmin以外,我还可以执行哪些操作并安装所有requirements.txt

1 个答案:

答案 0 :(得分:1)

运行sudo python不会使用你的virtualenv。全局安装pgadmin reqs或删除sudo。