Python 2.7 SimlpeQueue Import Error (a bug?)

我的未来我决定 提交于 2020-01-04 06:14:30

问题


$ python2.6 -c 'from multiprocessing.queues import SimpleQueue'
$ python2.7 -c 'from multiprocessing.queues import SimpleQueue'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 22, in <module>
    from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 33, in <module>
    " function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.

$ uname -a
Linux xxx-ubuntu-64 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:45:36 UTC 2010 x86_64  GNU/Linux

回答1:


They recently fixed this in Ubuntu for Python3: https://bugs.launchpad.net/ubuntu/lucid/+source/python3.1/+bug/630511

The report for 2.7 is here: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/683027



来源:https://stackoverflow.com/questions/4321998/python-2-7-simlpequeue-import-error-a-bug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!