I'm trying to run simple programs from Python doc using multiprocessing
, however I always get errors like:
Traceback (most recent call last):
File "Poolexample.py", line 1, in <module>
from multiprocessing import Pool
ImportError: cannot import name Pool
or similarly, cannot import name Process
. Anyone knows why does Python send me such errors?
As @ahojnnes said, multiprocessing
was introduced in Python 2.6. So, be sure to use Python 2.6+ if you need this module with painless integration.
However, you could use python-multiprocessing, which is a backport of multiprocessing
for Python 2.4 and 2.5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With