title: class ForkAwareLocal(threading.local): AttributeError: 'module' object has no attribute 'local
body: <p>I'm a python newbie.
  Am trying this code snippet from the manual, but am getting this error.
  Cannot figure out why.
  Any help will be appreciated.
  Thx</p>
  
  <h2>Abhi</h2>
  
  <h2>code snippet</h2>
  
  <pre><code>#/usr/bin/python
  # -*- coding: utf-8 -*-
  
  from multiprocessing import Pool
  def f(x):
  return x*x
  
  p = Pool(1)
  p.map(f, [1, 2, 3])
  </code></pre>
  
  <hr>
  
  <h2>Error</h2>
  
  <pre><code>[root@localhost mpls-perf]# python thr_1.py 
  Traceback (most recent call last):
    File "thr_1.py", line 4, in &lt;module&gt;
      from multiprocessing import Pool
    File "/usr/lib64/python2.7/multiprocessing/__init__.py", line 65, in &lt;module&gt;
      from multiprocessing.util import SUBDEBUG, SUBWARNING
    File "/usr/lib64/python2.7/multiprocessing/util.py", line 340, in &lt;module&gt;
      class ForkAwareLocal(threading.local):
  AttributeError: 'module' object has no attribute 'local'
  Exception AttributeError: '_shutdown' in &lt;module 'threading' 
  from '/root/nfs/zebos/tests/mpls-             perf/threading.pyc'&gt; ignored
  </code></pre>
  
  <hr>
  
  <p>OS etc
  [root@localhost mpls-perf]# uname -a
  Linux localhost.localdomain 3.4.4464bit-smp-xp1.1-allpatch #1 SMP Wed Oct 15 17:34:02 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux</p>
  
  <p>[root@localhost mpls-perf]# python -V
  Python 2.7.5
  [root@localhost mpls-perf]</p>