<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1850" rel="nofollow">http://projects.scipy.org/numpy/ticket/1850</a> on 2011-05-29 by trac user elvisjohndowson, assigned to unknown.</em></p>
<p dir="auto">Hi,<br>
I installed python-2.7 installer from the following location</p>
<p dir="auto"><a href="http://python.org/ftp/python/2.7.1/python-2.7.1-macosx10.6.dmg" rel="nofollow">http://python.org/ftp/python/2.7.1/python-2.7.1-macosx10.6.dmg</a></p>
<p dir="auto">rebuilt numpy-1.6.0 and nose-1.0.0, and get the following errors:</p>
<p dir="auto">creating /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmp6HplH7<br>
compile options: '-I/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/src.macosx-10.6-intel-2.7 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'<br>
gfortran:f90: /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmp6HplH7/foo.f90<br>
gfortran:f77: /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/src.macosx-10.6-intel-2.7/_test_ext_module_5403-f2pywrappers.f<br>
/usr/bin/gfortran -Wall /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/src.macosx-10.6-intel-2.7/_test_ext_module_5403module.o /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/src.macosx-10.6-intel-2.7/fortranobject.o /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmp6HplH7/foo.o /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/src.macosx-10.6-intel-2.7/_test_ext_module_5403-f2pywrappers.o -lgfortran -o ./_test_ext_module_5403.so<br>
Undefined symbols for architecture x86_64:<br>
"_PyNumber_Int", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
"_PyComplex_Type", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
"_PyType_IsSubtype", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_array_from_pyobj in fortranobject.o<br>
"_PyErr_Occurred", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
_F2PyDict_SetItemString in fortranobject.o<br>
"_PyErr_SetString", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
_array_from_pyobj in fortranobject.o<br>
_fortran_setattr in fortranobject.o<br>
...<br>
"_PyObject_GetAttrString", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_repr in fortranobject.o<br>
"_PyErr_Clear", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_fortran_repr in fortranobject.o<br>
_F2PyDict_SetItemString in fortranobject.o<br>
"_PySequence_Check", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
"_PySequence_GetItem", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
"_Py_InitModule4_64", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyType_Type", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyImport_ImportModule", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyCObject_Type", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_F2PyCapsule_Check in fortranobject.o<br>
"_PyExc_RuntimeError", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_call in fortranobject.o<br>
"_PyExc_ImportError", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyErr_Print", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_F2PyDict_SetItemString in fortranobject.o<br>
"_PyCObject_AsVoidPtr", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_F2PyCapsule_AsVoidPtr in fortranobject.o<br>
"_PyErr_Format", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_call in fortranobject.o<br>
"_PyExc_AttributeError", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_setattr in fortranobject.o<br>
"_PyModule_GetDict", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyString_FromString", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_repr in fortranobject.o<br>
_fortran_getattr in fortranobject.o<br>
"_PyDict_SetItemString", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_F2PyDict_SetItemString in fortranobject.o<br>
_fortran_setattr in fortranobject.o<br>
_fortran_getattr in fortranobject.o<br>
_PyFortranObject_New in fortranobject.o<br>
"_PyErr_NewException", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyDict_GetItemString", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_getattr in fortranobject.o<br>
"_PyObject_SetAttrString", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"__Py_NoneStruct", referenced from:<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
_array_from_pyobj in fortranobject.o<br>
_fortran_setattr in fortranobject.o<br>
_fortran_getattr in fortranobject.o<br>
"_PyArg_ParseTupleAndKeywords", referenced from:<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
"_Py_BuildValue", referenced from:<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
"_PyExc_TypeError", referenced from:<br>
_fortran_call in fortranobject.o<br>
_array_from_pyobj in fortranobject.o<br>
"_PyString_AsString", referenced from:<br>
_fortran_repr in fortranobject.o<br>
_array_from_pyobj in fortranobject.o<br>
"_PyString_FromFormat", referenced from:<br>
_fortran_repr in fortranobject.o<br>
"_PyMem_Free", referenced from:<br>
_fortran_dealloc in fortranobject.o<br>
"_PyCObject_FromVoidPtr", referenced from:<br>
_F2PyCapsule_FromVoidPtr in fortranobject.o<br>
_fortran_getattr in fortranobject.o<br>
"_PyExc_ValueError", referenced from:<br>
_array_from_pyobj in fortranobject.o<br>
"_PyObject_Type", referenced from:<br>
_array_from_pyobj in fortranobject.o<br>
"_PyObject_Str", referenced from:<br>
_array_from_pyobj in fortranobject.o<br>
"__PyObject_New", referenced from:<br>
_PyFortranObject_NewAsAttr in fortranobject.o<br>
_PyFortranObject_New in fortranobject.o<br>
"_PyDict_New", referenced from:<br>
_PyFortranObject_NewAsAttr in fortranobject.o<br>
_fortran_setattr in fortranobject.o<br>
_PyFortranObject_New in fortranobject.o<br>
"_PyDict_DelItemString", referenced from:<br>
_fortran_setattr in fortranobject.o<br>
"_Py_FindMethod", referenced from:<br>
_fortran_getattr in fortranobject.o<br>
"_PyString_ConcatAndDel", referenced from:<br>
<em>fortran_getattr in fortranobject.o<br>
"<em>MAIN</em></em>", referenced from:<br>
_main in libgfortranbegin.a(fmain.o)<br>
ld: symbol(s) not found for architecture x86_64<br>
collect2: ld returned 1 exit status<br>
Undefined symbols for architecture x86_64:<br>
"_PyNumber_Int", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
"_PyComplex_Type", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
"_PyType_IsSubtype", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_array_from_pyobj in fortranobject.o<br>
"_PyErr_Occurred", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
_F2PyDict_SetItemString in fortranobject.o<br>
"_PyErr_SetString", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
_array_from_pyobj in fortranobject.o<br>
_fortran_setattr in fortranobject.o<br>
...<br>
"_PyObject_GetAttrString", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_repr in fortranobject.o<br>
"_PyErr_Clear", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
_fortran_repr in fortranobject.o<br>
_F2PyDict_SetItemString in fortranobject.o<br>
"_PySequence_Check", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
"_PySequence_GetItem", referenced from:<br>
_int_from_pyobj in _test_ext_module_5403module.o<br>
"_Py_InitModule4_64", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyType_Type", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyImport_ImportModule", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyCObject_Type", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_F2PyCapsule_Check in fortranobject.o<br>
"_PyExc_RuntimeError", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_call in fortranobject.o<br>
"_PyExc_ImportError", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyErr_Print", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_F2PyDict_SetItemString in fortranobject.o<br>
"_PyCObject_AsVoidPtr", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_F2PyCapsule_AsVoidPtr in fortranobject.o<br>
"_PyErr_Format", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_call in fortranobject.o<br>
"_PyExc_AttributeError", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_setattr in fortranobject.o<br>
"_PyModule_GetDict", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyString_FromString", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_repr in fortranobject.o<br>
_fortran_getattr in fortranobject.o<br>
"_PyDict_SetItemString", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_F2PyDict_SetItemString in fortranobject.o<br>
_fortran_setattr in fortranobject.o<br>
_fortran_getattr in fortranobject.o<br>
_PyFortranObject_New in fortranobject.o<br>
"_PyErr_NewException", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"_PyDict_GetItemString", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
_fortran_getattr in fortranobject.o<br>
"_PyObject_SetAttrString", referenced from:<br>
_init_test_ext_module_5403 in _test_ext_module_5403module.o<br>
"__Py_NoneStruct", referenced from:<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
_array_from_pyobj in fortranobject.o<br>
_fortran_setattr in fortranobject.o<br>
_fortran_getattr in fortranobject.o<br>
"_PyArg_ParseTupleAndKeywords", referenced from:<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
"_Py_BuildValue", referenced from:<br>
_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o<br>
_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o<br>
"_PyExc_TypeError", referenced from:<br>
_fortran_call in fortranobject.o<br>
_array_from_pyobj in fortranobject.o<br>
"_PyString_AsString", referenced from:<br>
_fortran_repr in fortranobject.o<br>
_array_from_pyobj in fortranobject.o<br>
"_PyString_FromFormat", referenced from:<br>
_fortran_repr in fortranobject.o<br>
"_PyMem_Free", referenced from:<br>
_fortran_dealloc in fortranobject.o<br>
"_PyCObject_FromVoidPtr", referenced from:<br>
_F2PyCapsule_FromVoidPtr in fortranobject.o<br>
_fortran_getattr in fortranobject.o<br>
"_PyExc_ValueError", referenced from:<br>
_array_from_pyobj in fortranobject.o<br>
"_PyObject_Type", referenced from:<br>
_array_from_pyobj in fortranobject.o<br>
"_PyObject_Str", referenced from:<br>
_array_from_pyobj in fortranobject.o<br>
"__PyObject_New", referenced from:<br>
_PyFortranObject_NewAsAttr in fortranobject.o<br>
_PyFortranObject_New in fortranobject.o<br>
"_PyDict_New", referenced from:<br>
_PyFortranObject_NewAsAttr in fortranobject.o<br>
_fortran_setattr in fortranobject.o<br>
_PyFortranObject_New in fortranobject.o<br>
"_PyDict_DelItemString", referenced from:<br>
_fortran_setattr in fortranobject.o<br>
"_Py_FindMethod", referenced from:<br>
_fortran_getattr in fortranobject.o<br>
"_PyString_ConcatAndDel", referenced from:<br>
<em>fortran_getattr in fortranobject.o<br>
"<em>MAIN</em></em>", referenced from:<br>
_main in libgfortranbegin.a(fmain.o)<br>
ld: symbol(s) not found for architecture x86_64<br>
collect2: ld returned 1 exit status<br>
error: Command "/usr/bin/gfortran -Wall /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/src.macosx-10.6-intel-2.7/_test_ext_module_5403module.o /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/src.macosx-10.6-intel-2.7/fortranobject.o /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmp6HplH7/foo.o /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/src.macosx-10.6-intel-2.7/_test_ext_module_5403-f2pywrappers.o -lgfortran -o ./_test_ext_module_5403.so" failed with exit status 1</p>
<hr>
<p dir="auto">Ran 3548 tests in 42.107s</p>
<p dir="auto">FAILED (KNOWNFAIL=3, SKIP=1, errors=17)<br>
&lt;nose.result.TextTestResult run=3548 errors=17 failures=0&gt;</p>
<p dir="auto">Elvis Dowson</p>
<p dir="auto">With the <code class="notranslate">intel</code> / fat <code class="notranslate">python</code> binaries provided by the python.org installers, trying to import in 32-bit mode fails with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ arch -32 /Library/Frameworks/Python.framework/Versions/3.6/bin/python -c &quot;import numpy as np; print(np)&quot;
Traceback (most recent call last):
  File &quot;/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/__init__.py&quot;, line 16, in &lt;module&gt;
    from . import multiarray
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/multiarray.cpython-36m-darwin.so, 2): Library not loaded: /usr/local/gfortran/lib/i386/libgfortran.3.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/.dylibs/libopenblasp-r0.3.0.dev.dylib
  Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/__init__.py&quot;, line 142, in &lt;module&gt;
    from . import add_newdocs
  File &quot;/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/add_newdocs.py&quot;, line 13, in &lt;module&gt;
    from numpy.lib import add_newdoc
  File &quot;/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/lib/__init__.py&quot;, line 8, in &lt;module&gt;
    from .type_check import *
  File &quot;/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/lib/type_check.py&quot;, line 11, in &lt;module&gt;
    import numpy.core.numeric as _nx
  File &quot;/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/__init__.py&quot;, line 26, in &lt;module&gt;
    raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/multiarray.cpython-36m-darwin.so, 2): Library not loaded: /usr/local/gfortran/lib/i386/libgfortran.3.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/.dylibs/libopenblasp-r0.3.0.dev.dylib
  Reason: image not found"><pre class="notranslate"><code class="notranslate">$ arch -32 /Library/Frameworks/Python.framework/Versions/3.6/bin/python -c "import numpy as np; print(np)"
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/__init__.py", line 16, in &lt;module&gt;
    from . import multiarray
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/multiarray.cpython-36m-darwin.so, 2): Library not loaded: /usr/local/gfortran/lib/i386/libgfortran.3.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/.dylibs/libopenblasp-r0.3.0.dev.dylib
  Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "&lt;string&gt;", line 1, in &lt;module&gt;
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/__init__.py", line 142, in &lt;module&gt;
    from . import add_newdocs
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/add_newdocs.py", line 13, in &lt;module&gt;
    from numpy.lib import add_newdoc
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/lib/__init__.py", line 8, in &lt;module&gt;
    from .type_check import *
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/lib/type_check.py", line 11, in &lt;module&gt;
    import numpy.core.numeric as _nx
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/__init__.py", line 26, in &lt;module&gt;
    raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/multiarray.cpython-36m-darwin.so, 2): Library not loaded: /usr/local/gfortran/lib/i386/libgfortran.3.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/.dylibs/libopenblasp-r0.3.0.dev.dylib
  Reason: image not found
</code></pre></div>
<p dir="auto"><a href="https://gist.github.com/dhermes/bfc9c082797ea5d65d46d64aa742175d">Similar errors</a> occur in 2.7 and 3.5.</p>