Python 2.7 SimpleQueue 导入错误(是bug吗?)

2 投票
1 回答
3601 浏览
提问于 2025-04-16 07:52

在编程中,有时候我们需要处理一些数据,这些数据可能来自不同的地方,比如用户输入、文件或者网络请求。为了让程序能够理解和使用这些数据,我们通常需要将它们转换成一种特定的格式。

比如说,如果我们从一个网页上获取了一些信息,这些信息可能是以文本的形式存在的。为了让程序能够更好地处理这些信息,我们可能需要将它们转换成一个对象,这样程序就可以更方便地访问和操作这些数据。

在这个过程中,我们可能会用到一些工具和库,它们可以帮助我们更轻松地进行数据转换。比如,有些库可以自动将文本转换成对象,省去了我们手动处理的麻烦。

总之,数据转换是编程中一个非常重要的步骤,它能帮助我们更好地管理和使用数据。

$ 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 个回答

1

他们最近在Ubuntu系统中修复了Python3的问题,具体信息可以查看这个链接:https://bugs.launchpad.net/ubuntu/lucid/+source/python3.1/+bug/630511

关于Python2.7的问题报告在这里:https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/683027

撰写回答