Python SEM_OPEN 错误

发布于 2024-12-28 23:02:16 字数 1036 浏览 5 评论 0原文

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

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

然后我尝试通过运行来启动 celery

$ python manage.py celeryd

但它给了我这个错误

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

我做了一些研究并发现这里的错误http://bugs.python.org/issue3770,据说已经修复了,但我猜不为蟒蛇2.7。

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

我启动了 python shell 并运行 :

import multiprocessing

没有错误,但是我然后运行:

from multiprocessing import synchronize

并收到错误(上面)。

任何帮助表示赞赏。

I am trying to use Celery running with RabbitMQ and Django. So far i have RabbitMQ 2.7 installed on my server, along with python 2.7 , Django 1.3, celery 2.4.6 and django-celery 2.4.2

i followed the simple instructions here http://django-celery.readthedocs.org/en/latest/introduction.html

and then i tried to start celery by running

$ python manage.py celeryd

but it gave me this error

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

i did some research and found the bug here http://bugs.python.org/issue3770, and its supposedly fixed, but i guess not for python 2.7.

Also, My OS is CentOS release 4.9 (Final). And i built python from source.

I started the python shell and ran :

import multiprocessing

with no errors, however i then ran:

from multiprocessing import synchronize

and i got the error ( above ).

Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久随 2025-01-04 23:02:16

我在 OpenVZ 下运行的 CentOS 6 上遇到了同样的问题。我必须安装 /dev/shm 因为它丢失了。将以下内容添加到 /etc/fstab 中:

tmpfs   /dev/shm    tmpfs   defaults        0   0

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

checking for sem_open... yes

I ran into the same problem on CentOS 6 running under OpenVZ. I had to mount /dev/shm because it was missing. Add the following to /etc/fstab:

tmpfs   /dev/shm    tmpfs   defaults        0   0

And then run sudo mount /dev/shm and see if it works. I had my own custom built Python 2.7.3 and this device needs to be present when building as well, otherwise Python will not be build with sem_open support. Check for the following output when running ./configure:

checking for sem_open... yes
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文