简体   繁体   English

如何在Ubuntu中修复“ ImportError:没有名为json的模块”?

[英]How to fix “ImportError: No module named json” in Ubuntu?

I'm having issues with Apache Airflow. 我在使用Apache Airflow时遇到问题。 I'm working on Windows, so I had to install Ubuntu. 我在Windows上工作,因此必须安装Ubuntu。 It seemed to work at first but now it gives me "ImportError: No module named json" when I run: 乍一看似乎可行,但现在我运行时显示“ ImportError:No module named json”:

airflow initdb

Previously I did: 以前我做过:

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

After that, I get python2.7.15+ 之后,我得到python2.7.15 +

I'm not sure what I actually did wrong, as I've already managed to run Airflow, but then I had to reset everything and redo. 我不确定我实际做错了什么,因为我已经设法运行了Airflow,但是随后我必须重置所有内容并重做。 And now I have this problem with json. 现在我遇到了json这个问题。 Would be really grateful if somebody could help me with it. 如果有人可以帮助我,我将非常感激。

只需升级烧瓶:

pip install --upgrade Flask

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM