[IPython-user] Ipython and multiprocessing

Robin robince@gmail....
Wed Dec 17 05:00:24 CST 2008


On Wed, Dec 17, 2008 at 10:02 AM, Michael Schmuker <schmuker@gmail.com> wrote:
> With ipython 0.9.1 I first get an PicklingError and the console hangs.
> Hitting ^C then raises another error, and the only way to get my
> terminal back is via ^\. Console log is attached.
>
> Any ideas what's going wrong here?

I had the same problem... see the threads here:
http://thread.gmane.org/gmane.comp.python.ipython.user/4058
http://thread.gmane.org/gmane.comp.python.ipython.user/4052

This happens because IPython can't pickle an interactively defined
function. It will work if you put the file in a seperate module and
import it.

I think it is really a shame because it would be really handy to be
able to use this interactively - something I would like to do is to be
able to quickly and interactively set off runs ie
p = Pool(processes=8)
p.map(lambda x: somefunc(x,10,other_params), range(10))

but this obviously fails because it can't pickle the function.


More information about the IPython-user mailing list