在具有Python 2.7默认版本的Ubuntu 16.04上,我正在尝试安装Apache airflow,但是遇到了几个问题,目前我看到
apache initdb Traceback (most recent call last): File "/usr/local/bin/airflow", line 21, in <module> from airflow import configuration File "/usr/local/lib/python2.7/dist-packages/airflow/__init__.py", line 40, in <module> from flask_admin import BaseView File "/usr/local/lib/python2.7/dist-packages/flask_admin/__init__.py", line 6, in <module> from .base import expose, expose_plugview, Admin, BaseView, AdminIndexView # noqa: F401 File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 6, in <module> from flask import Blueprint, current_app, render_template, abort, g, url_for File "/usr/local/lib/python2.7/dist-packages/flask/__init__.py", line 20, in <module> from .app import Flask File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 69, in <module> from .wrappers import Request File "/usr/local/lib/python2.7/dist-packages/flask/wrappers.py", line 14, in <module> from werkzeug.wrappers.json import JSONMixin as _JSONMixin ImportError: No module named json
到现在为止,尝试了以下这些事情:
$ sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev sudo pip install -U Werkzeug==0.14.1 sudo pip install -U Jinja2==2.10.1
也试过了
pip install jsonate pip install json # (this did not work) python Python 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import json >>> exit()
到目前为止没有任何工作。
只需升级烧瓶。您可以使用以下命令:
sudo pip install --upgrade Flask