python - 如何在 Ubuntu 中修复 "ImportError: No module named json"?

标签 python json ubuntu airflow

我在使用 Apache Airflow 时遇到问题。我在 Windows 上工作,所以我必须安装 Ubuntu。起初它似乎有效,但现在它在我运行时给了我“ImportError:No module named json”:

airflow initdb

以前我做过:

sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install python-pip
pip install apache-airflow

之后得到python2.7.15+

我不确定我到底做错了什么,因为我已经设法运行 Airflow,但后来我不得不重置所有内容并重做。现在我遇到了 json 的问题。 如果有人能帮助我,我将不胜感激。

最佳答案

只需升级 flask :

pip install --upgrade Flask

关于python - 如何在 Ubuntu 中修复 "ImportError: No module named json"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56931164/

相关文章:

在 IDLE 中定义时 Python 池会无提示地崩溃

python - 在 python 3.5 中构建位字符串时出错 : the datatype is being set to U32 without my control

python - 如何在 1 行中分配具有相同参数的 2 个变量

python - 在 Python 中迭代和打印 JSON 对象

postgresql - 消除 Ubuntu 10.04 上不工作的 PostgreSQL 安装并重新开始

mysql - 无法找到也无法安装 mysql_config

python - QLineEdit 只接受 PyQt4 中的字符

javascript - Uncaught ReferenceError : Invalid left-hand side in assignment while fetching value from JSON. stringify(数据)

javascript - 如何获取多个选择框值并插入字符串数组

android - Android 版 Swift : `ld` cannot find `-lgcc` in swift for android compilation linking step