Python守护程序错误



我正在尝试使python脚本作为守护进程运行,当尝试导入运行器模型时,我面临这个问题:

Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from daemon import runner
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/python_daemon-1.5.5-py2.6.egg/daemon/runner.py", line 25, in <module>
    import pidlockfile
  File "/usr/local/lib/python2.6/dist-packages/python_daemon-1.5.5-py2.6.egg/daemon/pidlockfile.py", line 33, in <module>
    class PIDLockFile(LinkFileLock, object):
TypeError: Error when calling the metaclass bases
    function() argument 1 must be code, not str

我在Debian 6.0下编程,手动和通过apt安装了python-daemon和lockfile,但没有任何改变。任何想法?

问候…

显示python-daemon的版本与lockfile的版本不兼容。这可以在pypi上发生。如果您不关心最近的版本,请删除手动安装的版本,并依赖python-daemon包。只要您在回溯中看到/usr/local,您就没有使用Debian的版本。

相关内容

最新更新