Installing scipy on OS 10.6.2
I have been unsuccessful at installing scipy on OS 10.6. When I try to build from the distribution, I get a huge number of library architecture errors. I've tried to build both against the python that comes with the system (2.6.1) and against the MacPort python (2.6.5) (see test summary at end of message). When I try to install via MacPort, it appears to install but much functionality is missing (e.g. curve_fit) that I assume is because the BLAS and LAPACK libraries aren't being linked to correctly. I'm using OS 10.6.2 on an Intel iMac. The latest Xcode is installed (3.2.1) with: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1) gfortran from research.att.acom: GNU Fortran (GCC) 4.2.3 I would appreciate suggestions. ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/fftpack/_fftpack.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/fftpack/_fftpack.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/special/_cephes.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/special/_cephes.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: test_integer (test_array_import.TestReadArray) ---------------------------------------------------------------------- ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pytho n2.6/site-packages/scipy/special/_cephes.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/special/_cephes.so: no matching architecture in universal wrapper ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/lib/blas/fblas.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/lib/blas/fblas.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/lib/lapack/calc_lwork.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/lib/lapack/calc_lwork.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/linalg/flapack.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/linalg/flapack.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/sparse/linalg/isolve/_iterative.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/sparse/linalg/isolve/_iterative.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/optimize/minpack2.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/optimize/minpack2.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/odr/__odrpack.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/odr/__odrpack.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/optimize/minpack2.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/optimize/minpack2.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/special/_cephes.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/special/_cephes.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/sparse/linalg/isolve/_iterative.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/sparse/linalg/isolve/_iterative.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/sparse/linalg/isolve/_iterative.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/sparse/linalg/isolve/_iterative.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/special/_cephes.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/special/_cephes.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== ERROR: Failure: ImportError (dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/pyth on2.6/site-packages/scipy/special/_cephes.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/si te-packages/scipy/special/_cephes.so: no matching architecture in universal wrapper) ---------------------------------------------------------------------- ====================================================================== FAIL: test_mio.test_warnings(<type 'exceptions.FutureWarning'>, <function loadmat at 0x1048f61b8>, '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/s ite-packages/scipy/io/matlab/tests/data/testdouble_7.1_GLNX86.mat') ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/s ite-packages/nose/case.py", line 183, in runTest self.test(*self.arg) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/s ite-packages/numpy/testing/utils.py", line 693, in assert_raises return nose.tools.assert_raises(*args,**kwargs) AssertionError: FutureWarning not raised ---------------------------------------------------------------------- Ran 1382 tests in 428.657s FAILED (KNOWNFAIL=6, SKIP=3, errors=16, failures=1) Out[3]: <nose.result.TextTestResult run=1382 errors=16 failures=1>
On Tue, Mar 23, 2010 at 10:57 PM, Paul Fuoss <fuoss@anl.gov> wrote:
I have been unsuccessful at installing scipy on OS 10.6. When I try to build from the distribution, I get a huge number of library architecture errors. I've tried to build both against the python that comes with the system (2.6.1) and against the MacPort python (2.6.5) (see test summary at end of message).
When I try to install via MacPort, it appears to install but much functionality is missing (e.g. curve_fit) that I assume is because the BLAS and LAPACK libraries aren't being linked to correctly.
I'm using OS 10.6.2 on an Intel iMac.
The latest Xcode is installed (3.2.1) with: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1)
gfortran from research.att.acom: GNU Fortran (GCC) 4.2.3
I would appreciate suggestions.
How are you trying to build? The error suggests you are building for the wrong achitecture (32 vs 64-bit). I have been able to build against the Apple-provided python but not the python.org version so far. The difference is that the former is 64-bit while the latter is 32-bit. For Apple Python, install numscons ( http://projects.scipy.org/numpy/wiki/NumScons) and gfortran (from http://r.research.att.com/tools/) and use: $ LDFLAGS="-lgfortran -arch x86_64" FFLAGS="-arch x86_64" python setupscons.py scons Cheers, Ralf
Ralf, I downloaded scipy from svn. Then I did the command: $ LDFLAGS="-lgfortran -arch x86_64" FFLAGS="-arch x86_64" sudo python setupscons.py install Trying this dies with: scons: done building targets. Executing scons command (pkg is scipy.fftpack): /usr/bin/python "/Library/Python/2.6/site-packages/numscons-0.10.1-py2.6.egg/numscons/scons-local/scons.py" -f scipy/fftpack/SConstruct -I. scons_tool_path="" src_dir="scipy/fftpack" pkg_name="scipy.fftpack" log_level=50 distutils_libdir="../../../../build/lib.macosx-10.6-universal-2.6" cc_opt=gcc-4.2 cc_opt_path="/usr/bin" f77_opt=gfortran f77_opt_path="/usr/local/bin" cxx_opt=g++-4.2 cxx_opt_path="/usr/bin" include_bootstrap=/Library/Python/2.6/site-packages/numpy-1.3.0-py2.6-macosx-10.6-universal.egg/numpy/core/include silent=0 bootstrapping=0 scons: Reading SConscript files ... Mkdir("build/scons/scipy/fftpack") AttributeError: SConfBase instance has no attribute 'CheckF77Mangling': File "/Users/fuossadmin/Desktop/Downloads/scipy/scipy/fftpack/SConstruct", line 2: GetInitEnvironment(ARGUMENTS).DistutilsSConscript('SConscript') File "/Library/Python/2.6/site-packages/numscons-0.10.1-py2.6.egg/numscons/core/numpyenv.py", line 108: build_dir = '$build_dir', src_dir = '$src_dir') File "/Library/Python/2.6/site-packages/numscons-0.10.1-py2.6.egg/numscons/scons-local/scons-local-1.2.0/SCons/Script/SConscript.py", line 549: return apply(_SConscript, [self.fs,] + files, subst_kw) File "/Library/Python/2.6/site-packages/numscons-0.10.1-py2.6.egg/numscons/scons-local/scons-local-1.2.0/SCons/Script/SConscript.py", line 259: exec _file_ in call_stack[-1].globals File "/Users/fuossadmin/Desktop/Downloads/scipy/build/scons/scipy/fftpack/SConscript", line 11: config.CheckF77Mangling() error: Error while executing scons command. See above for more information. If you think it is a problem in numscons, you can also try executing the scons command with --log-level option for more detailed output of what numscons is doing, for example --log-level=0; the lowest the level is, the more detailed the output it. Any clues? Thanks. Paul ----- Original Message ----- From: "Ralf Gommers" <ralf.gommers@googlemail.com> To: "SciPy Developers List" <scipy-dev@scipy.org> Sent: Tuesday, March 23, 2010 10:10:04 AM GMT -06:00 US/Canada Central Subject: Re: [SciPy-Dev] Installing scipy on OS 10.6.2 On Tue, Mar 23, 2010 at 10:57 PM, Paul Fuoss < fuoss@anl.gov > wrote: I have been unsuccessful at installing scipy on OS 10.6. When I try to build from the distribution, I get a huge number of library architecture errors. I've tried to build both against the python that comes with the system (2.6.1) and against the MacPort python (2.6.5) (see test summary at end of message). When I try to install via MacPort, it appears to install but much functionality is missing (e.g. curve_fit) that I assume is because the BLAS and LAPACK libraries aren't being linked to correctly. I'm using OS 10.6.2 on an Intel iMac. The latest Xcode is installed (3.2.1) with: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1) gfortran from research.att.acom: GNU Fortran (GCC) 4.2.3 I would appreciate suggestions. How are you trying to build? The error suggests you are building for the wrong achitecture (32 vs 64-bit). I have been able to build against the Apple-provided python but not the python.org version so far. The difference is that the former is 64-bit while the latter is 32-bit. For Apple Python, install numscons ( http://projects.scipy.org/numpy/wiki/NumScons ) and gfortran (from http://r.research.att.com/tools/ ) and use: $ LDFLAGS="-lgfortran -arch x86_64" FFLAGS="-arch x86_64" python setupscons.py scons Cheers, Ralf _______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
On Wed, Mar 24, 2010 at 2:03 AM, Paul H. Fuoss <fuoss@anl.gov> wrote:
Ralf,
I downloaded scipy from svn. Then I did the command:
$ LDFLAGS="-lgfortran -arch x86_64" FFLAGS="-arch x86_64" sudo python setupscons.py install
Don't use sudo (it modifies how environment variables are handled), and remove the unnecessary -lgfortran. from LDFLAGS. David
While trying to build universal binaries on 10.5, I found that editing /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Makefile was easier than trying to fight my way through to a working set of environment variables. My particular changes were to modify these lines: BASECFLAGS= -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -no-cpp-precomp -mno-fused-madd -fno-common -dynamic LDFLAGS= -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g UNIVERSALSDK=/Developer/SDKs/MacOSX10.4u.sdk CONFIG_ARGS= '-C' '--enable-framework' '--enable-universalsdk=/Developer/SDKs/MacOSX10.4u.sdk' 'LDFLAGS=-g ' 'OPT=-g -O3 ' MACOSX_DEPLOYMENT_TARGET=10.3 After those changes, "python setup.py build" for numpy & scipy worked without problems, and without other variables being set. This may apply to your situation as well (using x86_64 to replace the other architectures). Thouis Jones On Tue, Mar 23, 2010 at 19:33, David Cournapeau <cournape@gmail.com> wrote:
On Wed, Mar 24, 2010 at 2:03 AM, Paul H. Fuoss <fuoss@anl.gov> wrote:
Ralf,
I downloaded scipy from svn. Then I did the command:
$ LDFLAGS="-lgfortran -arch x86_64" FFLAGS="-arch x86_64" sudo python setupscons.py install
Don't use sudo (it modifies how environment variables are handled), and remove the unnecessary -lgfortran. from LDFLAGS.
David _______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
participants (5)
-
David Cournapeau -
Paul Fuoss -
Paul H. Fuoss -
Ralf Gommers -
Thouis (Ray) Jones