我正在尝试制作一个 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,但没有任何改变。任何想法?
问候,,,