bash-4.1$ airflow initdb
Traceback (most recent call last):
File "/u/bin/airflow", line 4, in <module>
from airflow import configuration
File "/u/lib/python2.7/site-packages/airflow/__init__.py", line 31, in <module>
from airflow.models import DAG
File "/u/lib/python2.7/site-packages/airflow/models.py", line 53, in <module>
from croniter import croniter
File "/u/lib/python2.7/site-packages/croniter/__init__.py", line 3, in <module>
from .croniter import croniter
File "/u/lib/python2.7/site-packages/croniter/croniter.py", line 8, in <module>
from dateutil.relativedelta import relativedelta
File "build/bdist.linux-x86_64/egg/dateutil/relativedelta.py", line 5, in <module>
ImportError: cannot import name integer_types
但口译员没有问题:
bash-4.1$ /u/bin/python2.7
Python 2.7.5 (default, Oct 17 2013, 14:04:34)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import croniter
>>>
我假设它必须做一些事情:
File "build/bdist.linux-x86_64/egg/dateutil/relativedelta.py", line 5, in <module>
因此,在翻译中,它使用dateutil
中的/u/lib/python2.7
,而在气流中,它使用来自datutil
的{{1}} ??
我甚至不知道build/bdist.linux-x86_64/egg/dateutil
在哪里。
有人可以告诉我发生了什么以及如何告诉气流从正确的build/bdist.linux-x86_64/egg/dateutil
导入?