I am running a simple Hello World program on a 64-bit version of Windows 7 with the following features:
Python 3.4.3 | Anaconda 2.3.0 (64-bit) | [MSC v.1600 64 bit (AMD64)] IPython 4.0.0
Program:
from multiprocessing import Process, freeze_support def f(): print ('hello world!') if __name__ == '__main__':
gives the following error:
[I 15:02:23.855 NotebookApp] Saving file at /uhc/FeatureContributionToK-meansClu sterWithPC.ipynb Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Anaconda3\lib\multiprocessing\spawn.py", line 106, in spawn_main exitcode = _main(fd) File "C:\Anaconda3\lib\multiprocessing\spawn.py", line 116, in _main self = pickle.load(from_parent) AttributeError: Can't get attribute 'f' on module '__main__' (built-in)
Sanoj source share