最新版本的Airflow 1.10需要对日志记录进行一些设置。
我仔细遵循了说明,创建了一个config
文件夹,并将airflow/config_templates/airflow_local_settings.py
添加到PYTHONPATH
。
不幸的是,当运行Airflow时,我遇到了以下错误:
ValueError: Unable to configure handler 'processor':
Cannot resolve 'airflow.utils.log.file_processor_handler.FileProcessorHandler':
dlopen(/Users/arikliber/miniconda3/envs/py36-6/lib/python3.6/site-packages/psutil/_psutil_osx.cpython-36m-darwin.so, 2):
Symbol not found: ___CFConstantStringClassReference
Referenced from: /Users/arikliber/miniconda3/envs/py36-6/lib/python3.6/site-packages/psutil/_psutil_osx.cpython-36m-darwin.so
Expected in: flat namespace
in /Users/arikliber/miniconda3/envs/py36-6/lib/python3.6/site-packages/psutil/_psutil_osx.cpython-36m-darwin.so
所有的内容都安装在一个全新的miniconda环境中。
有没有人在Mac OS上(我使用的是10.13.6版本)安装过Airflow 1.10,并且愿意分享一下工作流程?
psutil
的问题,而不是airflow
的问题。当你运行python -c "import psutil"
时,会得到什么结果?如果你安装了多个Python版本,请选择与airflow
失败相同的版本,例如python3.6 -c
等。 - hoeflingTraceback (most recent call last): File "<string>", line 1, in <module> File "....psutil/__init__.py", line 134, in <module> from . import _psosx as _psplatform File "..../psutil/_psosx.py", line 14, in <module> from . import _psutil_osx as cext ImportError: dlopen(/.....psutil/_psutil_osx.cpython-36m-darwin.so, 2): Symbol not found: ___CFConstantStringClassReference Referenced from: ....psutil/_psutil_osx.cpython-36m-darwin.so Expected in: flat namespace in...psutil/_psutil_osx.cpython-36m-darwin.so
- Leopsutil
的版本。为了解决这个问题,我只需要在安装完Airflow之后运行pip install psutil --upgrade
即可。感谢@hoefling让我找到了正确的解决方法! - Leo