[Airflow] ImportError: No module named lockfile.pidlockfile

When setting up a clean install of airflow on ubuntu 14.04, I ran into the following error:

[email protected]:~$ airflow
[2016-07-19 15:37:41,839] {__init__.py:36} INFO - Using executor SequentialExecutor
[2016-07-19 15:37:41,912] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2016-07-19 15:37:41,929] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
Traceback (most recent call last):
  File "/usr/local/bin/airflow", line 5, in <module>
    from airflow.bin.cli import CLIFactory
  File "/usr/local/lib/python2.7/dist-packages/airflow/bin/cli.py", line 17, in <module>
    from daemon.pidfile import TimeoutPIDLockFile
  File "/usr/local/lib/python2.7/dist-packages/daemon/pidfile.py", line 18, in <module>
    from lockfile.pidlockfile import PIDLockFile
ImportError: No module named lockfile.pidlockfile

This seems to be because Airflow includes python-daemon >= 2.1.1 as a dependency, but not lockfile. It seems that some time before 2.1.1 python-daemon removed TimeoutPIDLockFile and instead decided just to use lockfile.

Uninstalling python-daemon and reinstalling fixed the issue, as python-daemon included a lockfile dependency.

Not sure why PyPi wouldn‘t have pulled this down when resolving Airflow‘s python-daemon dependency, but figured I‘d open this issue in case other run into it in the future. It might make sense for Airflow to explicitly require lockfile.

Tim added a comment - 15/Aug/16 16:30

I am having this same issue. Unfortunately uninstalling python-daemons and reinstalling does not work.

Tim added a comment - 15/Aug/16 18:07 - edited

I was using apt-get package manager for python-daemon. When switching to pip, the uninstall and reinstall worked.

Sergio Herrera added a comment - 07/Oct/16 10:06

Airflow has the dependency with python-daemon (currently 2.1.1), and that version depends on lockfile>=0.10 (latest 0.12.2). The problem is that python-daemon installation (through pip) doesn‘t carry its transitive dependency. I tried several times with virtual machines and virtual environments for testing the issue. Also I have upgraded my Airflow installation from 1.6.2 to 1.7.1.3 and it fails with this problem.
The problem is that Airflow doesn‘t depends on lockfile directly (or I cannot find the direct dependency), but I can make a PR with this change if necessary.

时间: 2024-08-13 04:02:11

[Airflow] ImportError: No module named lockfile.pidlockfile的相关文章

saltstack &quot;ImportError: No module named salt.scripts&quot;错误解决

一.问题描述 生产线上使用的自动化管理工具是saltstack,CentOS6.8 x64,python 2.6.6 ,正所谓不作不死,由于有些功能需要python2.7.x ,在升级好python2.7后,写了saltstack api 发现python2.7不好使,原理是python2.7下没有salt模块,因此pip install salt 即在python2.7下安装成功了salt模块,但是发现重启salt-master时报错.如下图: 生产线啊,这可不行,赶紧恢复吧.pip unin

python模块以及导入出现ImportError: No module named &#39;xxx&#39;问题

python模块以及导入出现ImportError: No module named 'xxx'问题 python中,每个py文件被称之为模块,每个具有__init__.py文件的目录被称为包.只要模 块或者包所在的目录在sys.path中,就可以使用import 模块或import 包来使用 如果你要使用的模块(py文件)和当前模块在同一目录,只要import相应的文件名就好,比 如在a.py中使用b.py:  import b 但是如果要import一个不同目录的文件(例如b.py)该怎么做

python:ImportError: No module named setuptools

python安装模块时: python  setup.py install 错误:ImportError: No module named setuptools 没有setuptools的模块,安装这个模块即可解决此问题: 下载setuptools包 wget   thttp://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz tar zxvf setuptools-0.6c11.tar.gz cd se

导入错误:ImportError: No module named &#39;requests&#39;

当引用错误的时候第一时间查看,我们有没有安装这个模块, 安装了pip之后查看和安装模块就很方便了, pip list 可以查看我们安装的模块, pip install requests 安装requests模块 安装完成之后就看一下用pip list 命令看一下 再次运行程序就可以了 导入错误:ImportError: No module named 'requests'

Python 之 ImportError: No module named ***

如果想使用非当前模块中的代码,需要使用Import,这个大家都知道. 如果你要使用的模块(py文件)和当前模块在同一目录,只要import相应的文件名就好,比如在a.py中使用b.py: import b 但是如果要import一个不同目录的文件(例如b.py)该怎么做呢?  首先需要使用sys.path.append方法将b.py所在目录加入到搜素目录中.然后进行import即可,例如 import sys sys.path.append('c:\xxxx\b.py') # 这个例子针对 wi

已经装了MySQL-python,但在引用时报错:ImportError: No module named MySQLdb

导入MySQLdb模块的时候报错,如下 >>> import MySQLdb Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named MySQLdb 在网上找了一个解决方法: yum install MySQL-python  (centos系统) 再次导入的时候还是报错,怀疑是版本问题: $ pyth

Ubuntu: ImportError: No module named xgboost

ImportError: No module named xgboost 解决办法: git clone --recursive https://github.com/dmlc/xgboost cd xgboost; sudo make -j4 sh build.sh cd python-package python setup.py install 如果已经完成了一下步骤: git clone --recursive https://github.com/dmlc/xgboost cd xgb

from setuptools import setup, find_packages ImportError: No module named set

1 wget http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py 2 ile "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>from dbapi2 import *File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 27, in

解决cocos2dx 打包lua环境搭建问题( ImportError: No module named Cheetah.Template)

将c++ 封装成lua调用时,显示一下错误: PYTHON_BIN not defined, use current python. generating userconf.ini... Generating bindings for cocos2dx_TextLoader... Traceback (most recent call last): File "/Applications/Cocos/frameworks/cocos2d-x-3.5/tools/bindings-generato