BonBonSlick
@BonBonSlick
Vanilla Full Stack Web Architector

No module named flask_babelex?

Похожий вопрос и якобы решения
https://stackoverflow.com/questions/39845604/pgadm...
https://pythonhosted.org/Flask-BabelEx/

setup.py
import argparse
import json
import os
import sys
from pgadmin.model import db, User, Version, ServerGroup, Server, \
    SCHEMA_VERSION as CURRENT_SCHEMA_VERSION

if sys.version_info[0] >= 3:
    import builtins
else:
...


__init__py
import sys
from types import MethodType
from collections import defaultdict
from importlib import import_module

from flask import Flask, abort, request, current_app, session, url_for
from werkzeug.exceptions import HTTPException
from flask_babelex import Babel, gettext
from flask_login import user_logged_in, user_logged_out
...

test@srv49167738:/usr/local/lib/python3.5/dist-packages/pgadmin4$ sudo pip3 install Babel
Requirement already satisfied: Babel in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: pytz>=2015.7 in /usr/local/lib/python3.5/dist-packages (from Babel)

test@srv49167738:/usr/local/lib/python3.5/dist-packages/pgadmin4$ sudo pip3 install flask_babel
Requirement already satisfied: flask_babel in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: Flask in /usr/local/lib/python3.5/dist-packages (from flask_babel)
Requirement already satisfied: Jinja2>=2.5 in /usr/local/lib/python3.5/dist-packages (from flask_babel)
Requirement already satisfied: Babel>=2.3 in /usr/local/lib/python3.5/dist-packages (from flask_babel)
Requirement already satisfied: click>=5.1 in /usr/local/lib/python3.5/dist-packages (from Flask->flask_babel)
Requirement already satisfied: itsdangerous>=0.24 in /usr/local/lib/python3.5/dist-packages (from Flask->flask_babel)
Requirement already satisfied: Werkzeug>=0.14 in /usr/local/lib/python3.5/dist-packages (from Flask->flask_babel)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.5/dist-packages (from Jinja2>=2.5->flask_babel)
Requirement already satisfied: pytz>=2015.7 in /usr/local/lib/python3.5/dist-packages (from Babel>=2.3->flask_babel)

test@srv49167738:/usr/local/lib/python3.5/dist-packages/pgadmin4$ sudo pip3 install Flask-BabelEx
Requirement already satisfied: Flask-BabelEx in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: Jinja2>=2.5 in /usr/local/lib/python3.5/dist-packages (from Flask-BabelEx)
Requirement already satisfied: Flask in /usr/local/lib/python3.5/dist-packages (from Flask-BabelEx)
Requirement already satisfied: Babel>=1.0 in /usr/local/lib/python3.5/dist-packages (from Flask-BabelEx)
Requirement already satisfied: speaklater>=1.2 in /usr/local/lib/python3.5/dist-packages (from Flask-BabelEx)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.5/dist-packages (from Jinja2>=2.5->Flask-BabelEx)
Requirement already satisfied: itsdangerous>=0.24 in /usr/local/lib/python3.5/dist-packages (from Flask->Flask-BabelEx)
Requirement already satisfied: click>=5.1 in /usr/local/lib/python3.5/dist-packages (from Flask->Flask-BabelEx)
Requirement already satisfied: Werkzeug>=0.14 in /usr/local/lib/python3.5/dist-packages (from Flask->Flask-BabelEx)
Requirement already satisfied: pytz>=2015.7 in /usr/local/lib/python3.5/dist-packages (from Babel>=1.0->Flask-BabelEx)


test@srv49167738:/usr/local/lib/python3.5/dist-packages/pgadmin4$ sudo python setup.py
Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    from pgadmin.model import db, User, Version, ServerGroup, Server, \
  File "/usr/local/lib/python3.5/dist-packages/pgadmin4/pgadmin/__init__.py", line 21, in <module>
    from flask_babelex import Babel, gettext
ImportError: No module named flask_babelex


Однако, почему выдает ошибку?

Ведь пакеты стоят.
  • Вопрос задан
  • 48 просмотров
Решения вопроса 1
Ну правильно команда python запускала всегда версию 2.7, где этих пакетов нет.
Может надо писать:
sudo python3 setup.py
чтобы в нужную версию войти? нет?

P.S. Вообще меня жутко бесит что у питона есть 2.x и 3.x - куча несовместимостей и косяков вроде того что выше.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы