title: multiprocessing AttributeError module object has no attribute '__path__'
body: <p>i have a long script which at the end needs to run a function to all items of huge list which takes a long time,consider for example:</p>
  
  <pre><code>input_a= [1,2,3,4] # a lengthy computation on some data
  print('test.1') # for testing how the script runs
  input_b= [5,6,7,8]  # some other computation
  print('test.2')
  
  def input_analyzer(item_a): # analyzing item_a using input_a and input_b
       return(item_a * input_a[0]*input_b[2])
  
  from multiprocessing import Pool
  def analyzer_final(input_list):
      pool=Pool(7)
      result=pool.map(input_analyzer, input_list)
      return(result)
  
  my_list= [10,20,30,40,1,2,2,3,4,5,6,7,8,9,90,1,2,3] # a huge list of inputs
  
  if __name__=='__main__':
          result_final=analyzer_final(my_list)
          print(result_final)
      return(result)
  </code></pre>
  
  <p>the output of this codes, varies run to run but what all the runs has in common is several running of whole script, it seems that by assigning 7 as Pool, the whole script will run about 8 times!</p>
  
  <p><img src="https://i.stack.imgur.com/25Oi3.png" alt="enter image description here"></p>
  
  <p>im not sure if i got the concept of multiprocessing well, but i thought what it should do is just running the function 'input_analyzer' using several CPUs and not running the whole script several times. in case of my real code, its so long and it gives me a strange error :</p>
  
  <p><img src="https://i.stack.imgur.com/ZVNgR.png" alt="enter image description here"></p>
  
  <p>without using multiprocessing i run this code just fine, i dont know what im doing wrong here especially with error "AttributeError module object has no attribute '<strong>path</strong>'"i appreciate any help.</p>