I am working on a OS X 10.7 with Python 2.7 from python.org and XCode 4.2.
- Following these instructions, I tried changing the
CC,CXX, andFFLAGSvariables and install withsudo pip install numpy. However, the installation still looks forgcc-4.2. - I tried
installing
gcc-4.2through MacPorts but get thatError: gcc42 does not build on Snow Leopard or later. When I install numpy from the precompiled binary on sourceforge, I get the following error:
import numpy
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/init.py", line 137, in
import add_newdocsFile "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in
from numpy.lib import add_newdocFile "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/init.py", line 4, in
from type_check import *File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py", line 8, in
import numpy.core.numeric as _nxFile "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/init.py", line 5, in
import multiarrayImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so, 2): no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so: no matching architecture in universal wrapper
Any help?