Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/1850 on 2011-05-29 by trac user elvisjohndowson, assigned to unknown.

Hi,

I installed python-2.7 installer from the following location

http://python.org/ftp/python/2.7.1/python-2.7.1-macosx10.6.dmg

rebuilt numpy-1.6.0 and nose-1.0.0, and get the following errors:

creating /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmp6HplH7

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'

gfortran:f90: /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmp6HplH7/foo.f90

gfortran:f77: /var/folders/kE/kEV99wuDFGadcsS84CS4mE+++TI/-Tmp-/tmpaAXktG/src.macosx-10.6-intel-2.7/_test_ext_module_5403-f2pywrappers.f

/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

Undefined symbols for architecture x86_64:

"_PyNumber_Int", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

"_PyComplex_Type", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

"_PyType_IsSubtype", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_array_from_pyobj in fortranobject.o

"_PyErr_Occurred", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

_F2PyDict_SetItemString in fortranobject.o

"_PyErr_SetString", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

_array_from_pyobj in fortranobject.o

_fortran_setattr in fortranobject.o

...

"_PyObject_GetAttrString", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_repr in fortranobject.o

"_PyErr_Clear", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_fortran_repr in fortranobject.o

_F2PyDict_SetItemString in fortranobject.o

"_PySequence_Check", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

"_PySequence_GetItem", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

"_Py_InitModule4_64", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyType_Type", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyImport_ImportModule", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyCObject_Type", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_F2PyCapsule_Check in fortranobject.o

"_PyExc_RuntimeError", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_call in fortranobject.o

"_PyExc_ImportError", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyErr_Print", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_F2PyDict_SetItemString in fortranobject.o

"_PyCObject_AsVoidPtr", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_F2PyCapsule_AsVoidPtr in fortranobject.o

"_PyErr_Format", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_call in fortranobject.o

"_PyExc_AttributeError", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_setattr in fortranobject.o

"_PyModule_GetDict", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyString_FromString", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_repr in fortranobject.o

_fortran_getattr in fortranobject.o

"_PyDict_SetItemString", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_F2PyDict_SetItemString in fortranobject.o

_fortran_setattr in fortranobject.o

_fortran_getattr in fortranobject.o

_PyFortranObject_New in fortranobject.o

"_PyErr_NewException", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyDict_GetItemString", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_getattr in fortranobject.o

"_PyObject_SetAttrString", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"__Py_NoneStruct", referenced from:

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

_array_from_pyobj in fortranobject.o

_fortran_setattr in fortranobject.o

_fortran_getattr in fortranobject.o

"_PyArg_ParseTupleAndKeywords", referenced from:

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

"_Py_BuildValue", referenced from:

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

"_PyExc_TypeError", referenced from:

_fortran_call in fortranobject.o

_array_from_pyobj in fortranobject.o

"_PyString_AsString", referenced from:

_fortran_repr in fortranobject.o

_array_from_pyobj in fortranobject.o

"_PyString_FromFormat", referenced from:

_fortran_repr in fortranobject.o

"_PyMem_Free", referenced from:

_fortran_dealloc in fortranobject.o

"_PyCObject_FromVoidPtr", referenced from:

_F2PyCapsule_FromVoidPtr in fortranobject.o

_fortran_getattr in fortranobject.o

"_PyExc_ValueError", referenced from:

_array_from_pyobj in fortranobject.o

"_PyObject_Type", referenced from:

_array_from_pyobj in fortranobject.o

"_PyObject_Str", referenced from:

_array_from_pyobj in fortranobject.o

"__PyObject_New", referenced from:

_PyFortranObject_NewAsAttr in fortranobject.o

_PyFortranObject_New in fortranobject.o

"_PyDict_New", referenced from:

_PyFortranObject_NewAsAttr in fortranobject.o

_fortran_setattr in fortranobject.o

_PyFortranObject_New in fortranobject.o

"_PyDict_DelItemString", referenced from:

_fortran_setattr in fortranobject.o

"_Py_FindMethod", referenced from:

_fortran_getattr in fortranobject.o

"_PyString_ConcatAndDel", referenced from:

fortran_getattr in fortranobject.o

"MAIN", referenced from:

_main in libgfortranbegin.a(fmain.o)

ld: symbol(s) not found for architecture x86_64

collect2: ld returned 1 exit status

Undefined symbols for architecture x86_64:

"_PyNumber_Int", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

"_PyComplex_Type", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

"_PyType_IsSubtype", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_array_from_pyobj in fortranobject.o

"_PyErr_Occurred", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

_F2PyDict_SetItemString in fortranobject.o

"_PyErr_SetString", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

_array_from_pyobj in fortranobject.o

_fortran_setattr in fortranobject.o

...

"_PyObject_GetAttrString", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_repr in fortranobject.o

"_PyErr_Clear", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

_fortran_repr in fortranobject.o

_F2PyDict_SetItemString in fortranobject.o

"_PySequence_Check", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

"_PySequence_GetItem", referenced from:

_int_from_pyobj in _test_ext_module_5403module.o

"_Py_InitModule4_64", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyType_Type", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyImport_ImportModule", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyCObject_Type", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_F2PyCapsule_Check in fortranobject.o

"_PyExc_RuntimeError", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_call in fortranobject.o

"_PyExc_ImportError", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyErr_Print", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_F2PyDict_SetItemString in fortranobject.o

"_PyCObject_AsVoidPtr", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_F2PyCapsule_AsVoidPtr in fortranobject.o

"_PyErr_Format", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_call in fortranobject.o

"_PyExc_AttributeError", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_setattr in fortranobject.o

"_PyModule_GetDict", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyString_FromString", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_repr in fortranobject.o

_fortran_getattr in fortranobject.o

"_PyDict_SetItemString", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_F2PyDict_SetItemString in fortranobject.o

_fortran_setattr in fortranobject.o

_fortran_getattr in fortranobject.o

_PyFortranObject_New in fortranobject.o

"_PyErr_NewException", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"_PyDict_GetItemString", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

_fortran_getattr in fortranobject.o

"_PyObject_SetAttrString", referenced from:

_init_test_ext_module_5403 in _test_ext_module_5403module.o

"__Py_NoneStruct", referenced from:

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

_array_from_pyobj in fortranobject.o

_fortran_setattr in fortranobject.o

_fortran_getattr in fortranobject.o

"_PyArg_ParseTupleAndKeywords", referenced from:

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

"_Py_BuildValue", referenced from:

_f2py_rout__test_ext_module_5403_flatten in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_trans in _test_ext_module_5403module.o

_f2py_rout__test_ext_module_5403_foo in _test_ext_module_5403module.o

"_PyExc_TypeError", referenced from:

_fortran_call in fortranobject.o

_array_from_pyobj in fortranobject.o

"_PyString_AsString", referenced from:

_fortran_repr in fortranobject.o

_array_from_pyobj in fortranobject.o

"_PyString_FromFormat", referenced from:

_fortran_repr in fortranobject.o

"_PyMem_Free", referenced from:

_fortran_dealloc in fortranobject.o

"_PyCObject_FromVoidPtr", referenced from:

_F2PyCapsule_FromVoidPtr in fortranobject.o

_fortran_getattr in fortranobject.o

"_PyExc_ValueError", referenced from:

_array_from_pyobj in fortranobject.o

"_PyObject_Type", referenced from:

_array_from_pyobj in fortranobject.o

"_PyObject_Str", referenced from:

_array_from_pyobj in fortranobject.o

"__PyObject_New", referenced from:

_PyFortranObject_NewAsAttr in fortranobject.o

_PyFortranObject_New in fortranobject.o

"_PyDict_New", referenced from:

_PyFortranObject_NewAsAttr in fortranobject.o

_fortran_setattr in fortranobject.o

_PyFortranObject_New in fortranobject.o

"_PyDict_DelItemString", referenced from:

_fortran_setattr in fortranobject.o

"_Py_FindMethod", referenced from:

_fortran_getattr in fortranobject.o

"_PyString_ConcatAndDel", referenced from:

fortran_getattr in fortranobject.o

"MAIN", referenced from:

_main in libgfortranbegin.a(fmain.o)

ld: symbol(s) not found for architecture x86_64

collect2: ld returned 1 exit status

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

Ran 3548 tests in 42.107s

FAILED (KNOWNFAIL=3, SKIP=1, errors=17)

<nose.result.TextTestResult run=3548 errors=17 failures=0>

Elvis Dowson

Issue 2:
With the intel / fat python binaries provided by the python.org installers, trying to import in 32-bit mode fails with:

$ 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 <module>
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 "<string>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/__init__.py", line 142, in <module>
from . import add_newdocs
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/add_newdocs.py", line 13, in <module>
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 <module>
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 <module>
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 <module>
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

Similar errors occur in 2.7 and 3.5.