我需要制作一个与Python2.7一起顺利运行的脚本,以便在Python2.6下运行:
该脚本正在使用multiprocessing.Queue from multiprocessing import Process, Queue, Manager
,似乎存在一些兼容性问题。我在启动脚本时得到了这个:
File "gateway.py", line 510, in <module>
NodeQ = Queue() # Queue holding the node strrings for processing
File "/usr/lib/python2.6/multiprocessing/__init__.py", line 213, in Queue
return Queue(maxsize)
File "/usr/lib/python2.6/multiprocessing/queues.py", line 37, in __init__
self._rlock = Lock()
File "/usr/lib/python2.6/multiprocessing/synchronize.py", line 117, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1)
File "/usr/lib/python2.6/multiprocessing/synchronize.py", line 49, in __init__
sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 38] Function not implemented
如何使其兼容?