title: OS X with Python: Dynamic module not initialized properly
body: <p>I'm having some problems when trying to execute the pycaffe:</p>
  
  <p>Traceback (most recent call last):</p>
  
  <pre><code>File "/usr/local/bin/../Cellar/python/2.7.11/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 548, in &lt;module&gt;
      main()
    File "/usr/local/bin/../Cellar/python/2.7.11/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 530, in main
      known_paths = addusersitepackages(known_paths)
    File "/usr/local/bin/../Cellar/python/2.7.11/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 266, in addusersitepackages
      user_site = getusersitepackages()
    File "/usr/local/bin/../Cellar/python/2.7.11/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 241, in getusersitepackages
      user_base = getuserbase() # this will also set USER_BASE
    File "/usr/local/bin/../Cellar/python/2.7.11/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 231, in getuserbase
      USER_BASE = get_config_var('userbase')
    File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 520, in get_config_var
      return get_config_vars().get(name)
    File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 453, in get_config_vars
      import re
    File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 108, in &lt;module&gt;
      import _locale
  SystemError: dynamic module not initialized properly
  </code></pre>
  
  <p>I have read about it and it seems to be something related with Python linking (I am using the Homebrew one).</p>