Recently I reinstalled the latest Anaconda3 on Mac and found some an error in
from multiprocessing import Pool
def f(x):
return x*x
with Pool(5) as p:
p.apply(f, [1])
The error is like
AttributeError: Can't get attribute 'f' on <module '__main__' (built-in)>
But the same code worked several days before!!!