Library not loaded: libgfortran.3.dylib

Error

import scipy.interpolate
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/scipy/interpolate/__init__.py", line 160, in <module>
    from .interpolate import *
  File "/Library/Python/2.7/site-packages/scipy/interpolate/interpolate.py", line 15, in <module>
    import scipy.special as spec
  File "/Library/Python/2.7/site-packages/scipy/special/__init__.py", line 546, in <module>
    from ._ufuncs import *
ImportError: dlopen(/Library/Python/2.7/site-packages/scipy/special/_ufuncs.so, 2): Library not loaded: /usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgfortran.3.dylib
  Referenced from: /Library/Python/2.7/site-packages/scipy/special/_ufuncs.so
  Reason: image not found

Solution

pip install --upgrade --force-reinstall numpy
pip install --upgrade --force-reinstall scipy