Python2.7 Windows10 spyder3.3.0
I tried a tutorial code using multiprocessing Pool, but it does not seem to start. Does anyone have any ideas? My Python console just stops and never works again without terminating the console. The code is as below. I really appreciate your asking me if you would need to know more about my Python version or any PC specs.
from multiprocessing import Pool
def f(x):
return x*x
if __name__ == '__main__':
p = Pool(5)
print(p.map(f, [1, 2, 3]))
The output should be as below.
[1, 4, 9]
P.S. Thank all of you guys giving me the comment! I understand that it is not working in Spyder. But, how about in PyCharm? If any of you have tried it in PyCharm, Could you tell me if it is working?
Thank you all guys!