title: Python on Mac: How should I manage same modules in different directories?
body: <p>I am having problems figuring out what is the best practice for handling duplicate modules with different version in different directories.
  What I have done and figured out so far is the following.</p>
  
  <p>I updated numpy on my Mac X (Mavericks) using pip which installed the latest version (v1.8.2) of numpy in the following directory:</p>
  
  <pre><code>/Library/Python/2.7/site-packages
  </code></pre>
  
  <p>When I tried importing numpy in an interactive session, however, python imported the old version (v1.6.2) from the following directory:</p>
  
  <pre><code>/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
  </code></pre>
  
  <p>It seems like this happened because python searched for numpy in the second directory before discovering the newer version in the first directory.</p>
  
  <p>According to a <a href="https://stackoverflow.com/questions/20762667/python-doesnt-use-updated-pip-scipy-package">a previous post,</a> you can let python load the newer numpy by change the order of search or by deleting the directory which contains the old module. However some say that <a href="http://jessenoller.com/blog/2009/03/16/so-you-want-to-use-python-on-the-mac" rel="nofollow noreferrer">It is not a good idea to modify the contents of /System/Library/Frameworks</a>.</p>
  
  <p>So what is the best thing to do?
  Changing the order of the search seems like a good idea because it will not alter any files or directories, but will it cause any problems if I do that?
  Or is there anything else that can solve the problem?</p>