在kubuntu 18下,我尝试按照此处http://docs.elastichq.org/installation.html#installation
的方式安装elasticsearch-HQ。但是我遇到了错误:
pip install -r requirements.txt
...
Successfully built alembic
Installing collected packages: jmespath, itsdangerous, MarkupSafe, Jinja2, Werkzeug, click, Flask, pytz, six, aniso8601, Flask-restful, Flask-Script, marshmallow, flask-marshmallow, SQLAlchemy, marshmallow-sqlalchemy, urllib3, idna, certifi, chardet, requests, dogpile.cache, Flask-SQLAlchemy, Mako, python-editor, python-dateutil, alembic, Flask-Migrate, coverage, nose, Flask-Testing, py, pytest, pytest-cov, pytest-ordering, tzlocal, setuptools, funcsigs, futures, apscheduler, Flask-APScheduler, python-engineio, python-socketio, Flask-SocketIO, enum34, greenlet, eventlet
Successfully installed Flask-0.12.2 Flask-APScheduler-1.7.1 Flask-Migrate-2.3.0 Flask-SQLAlchemy-2.3.2 Flask-Script-2.0.6 Flask-SocketIO-3.0.1 Flask-Testing-0.7.1 Flask-restful-0.3.6 Jinja2-2.10 Mako-1.0.7 MarkupSafe-1.1.0 SQLAlchemy-1.2.0 Werkzeug-0.14.1 alembic-1.0.3 aniso8601-4.0.1 apscheduler-3.5.0 certifi-2018.10.15 chardet-3.0.4 click-7.0 coverage-3.7.1 dogpile.cache-0.6.5 enum34-1.1.6 eventlet-0.23.0 flask-marshmallow-0.8.0 funcsigs-1.0.2 futures-3.2.0 greenlet-0.4.15 idna-2.7 itsdangerous-1.1.0 jmespath-0.9.3 marshmallow-3.0.0b5 marshmallow-sqlalchemy-0.13.2 nose-1.3.4 py-1.7.0 pytest-3.0.2 pytest-cov-2.3.1 pytest-ordering-0.5 python-dateutil-2.7.2 python-editor-1.0.3 python-engineio-2.2.0 python-socketio-2.0.0 pytz-2018.7 requests-2.20.1 setuptools-40.6.2 six-1.11.0 tzlocal-1.5.1 urllib3-1.22
serge@serge:/mnt/_work_sdb8/wwwroot/elasticsearch-HQ$ python3 application.py
Traceback (most recent call last):
File "application.py", line 5, in <module>
from elastichq import create_app
File "/mnt/_work_sdb8/wwwroot/elasticsearch-HQ/elastichq/__init__.py", line 1, in <module>
from flask import Flask
ImportError: cannot import name 'Flask'
我安装了python-flask版本(0.12.2-3)并重新启动了控制台,但无论如何我还是遇到此错误。 是否缺少某些环境选择?如何解决? 我从未使用过python,也不知道如何使用它...
谢谢!