This has nothing to do with MapReduce. Cython cannot deal with definition of closure (here: lambda function) inside a c(p)def function. If you want to use MapReduce with Cython code, you should not use the short one line interface of map reduce but rely on the programmatic interface using inheritance (see the source code of RESetMPExample for an example).