Python SEM_OPEN错误

Pau*_*ulo 5 python django celery django-celery

我正在尝试使用与RabbitMQ和Django一起运行的Celery.到目前为止,我的服务器上安装了RabbitMQ 2.7,以及python 2.7,Django 1.3,芹菜2.4.6和django-celery 2.4.2

我按照这里的简单说明http://django-celery.readthedocs.org/en/latest/introduction.html

然后我试着通过跑步开始芹菜

$ python manage.py celeryd
Run Code Online (Sandbox Code Playgroud)

但它给了我这个错误

Unrecoverable error: ImportError('This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
Run Code Online (Sandbox Code Playgroud)

我做了一些研究,发现这里的错误http://bugs.python.org/issue3770,它应该是固定的,但我猜不适用于python 2.7.

此外,我的操作系统是CentOS 4.9版(最终版).我从源代码构建了python.

我启动了python shell并运行:

import multiprocessing
Run Code Online (Sandbox Code Playgroud)

没有错误,然后我跑了:

from multiprocessing import synchronize
Run Code Online (Sandbox Code Playgroud)

我得到了错误(上图).

任何帮助表示赞赏.

Ada*_*erg 10

我在OpenVZ下运行的CentOS 6上遇到了同样的问题.我不得不登上/dev/shm因为它丢失了.将以下内容添加到/etc/fstab:

tmpfs   /dev/shm    tmpfs   defaults        0   0
Run Code Online (Sandbox Code Playgroud)

然后运行sudo mount /dev/shm,看看它是否有效.我有自己定制的Python 2.7.3,并且在构建时也需要存在此设备,否则Python将不会在sem_open支持下构建.运行时检查以下输出./configure:

checking for sem_open... yes
Run Code Online (Sandbox Code Playgroud)