[英]Apache Airflow ImportError: cannot import name '_psutil_linux'
I am installing apache airflow as per the installation steps provided at https://airflow.apache.org/start.html#quick-start我正在按照https://airflow.apache.org/start.html#quick-start提供的安装步骤安装 apache 气流
First Step - export AIRFLOW_HOME=~/airflow
(No error)第一步 -
export AIRFLOW_HOME=~/airflow
(无错误)
Second Step - pip install apache-airflow
(No error)第二步 -
pip install apache-airflow
(无错误)
Third Step - airflow initdb
( Error - ImportError: cannot import name '_psutil_linux'
)第三步 -
airflow initdb
(错误 - ImportError: cannot import name '_psutil_linux'
)
Detailed of error is shown in below image:错误的详细信息如下图所示:
Environment detail is as below-环境细节如下-
How should I go on resolving it?我应该如何继续解决它? I have already tried updating pip and installing python-dev but that does not work.
我已经尝试过更新 pip 并安装 python-dev 但这不起作用。
installing python-dev
will do the job安装
python-dev
将完成这项工作
if you are running ubuntu then sudo apt-get install python-dev
如果您正在运行 ubuntu,则
sudo apt-get install python-dev
or simply running pip install -U psutil
should do the job.或者简单地运行
pip install -U psutil
应该可以完成这项工作。
I've overcome this problem through the following command:我已经通过以下命令克服了这个问题:
pip install -U --ignore-installed psutil
This works if you have installed psutil
by pip
, otherwise, try via apt
in Ubuntu:如果您已通过
pip
安装了psutil
,则此方法有效,否则,请在 Ubuntu 中通过apt
尝试:
apt-get update
apt-get --only-upgrade install python-psutil
apt-get install python-psutil
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.