[issue9144] Import error for multiprocessing in 2.7rc2 on Windows

Giuseppe Ottaviano report at bugs.python.org
Fri Jul 2 15:43:15 CEST 2010


New submission from Giuseppe Ottaviano <giuott at gmail.com>:

With a fresh install from python-2.7rc2.amd64.msi (rc1 is also affected) multiprocessing gives the following error:

Python 2.7rc2 (r27rc2:82154, Jun 22 2010, 21:22:29) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiprocessing
>>> multiprocessing.Pool()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\multiprocessing\__init__.py", line 227, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild)
  File "C:\Python27\lib\multiprocessing\pool.py", line 89, in __init__
    self._setup_queues()
  File "C:\Python27\lib\multiprocessing\pool.py", line 181, in _setup_queues
    from .queues import SimpleQueue
  File "C:\Python27\lib\multiprocessing\queues.py", line 22, in <module>
    from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition
  File "C:\Python27\lib\multiprocessing\synchronize.py", line 22, in <module>
    from multiprocessing.forking import assert_spawning, Popen
  File "C:\Python27\lib\multiprocessing\forking.py", line 158, in <module>
    from ._multiprocessing import win32, Connection, PipeConnection
ImportError: No module named _multiprocessing

I noticed that _multiprocessing.lib is not in Lib/multiprocessing/ but in libs/, so I don't know why there is a relative import here.
Changing all the occurrences to
  from _multiprocessing import ...
everything works fine.

----------
components: Library (Lib)
messages: 109109
nosy: ot
priority: normal
severity: normal
status: open
title: Import error for multiprocessing in 2.7rc2 on Windows
type: crash
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9144>
_______________________________________


More information about the Python-bugs-list mailing list