[SciPy-User] Problems installing scipy on OS X 10.6 (Snow Leopard): libarpack

Uri Laserson laserson@mit....
Mon Dec 13 10:38:54 CST 2010


Hi Ralf,

Sor for my delayed response, I missed this message in my inbox.

I have since moved forward with this problem, but I now have a runtime
problem.

I am using python2.7 I built myself through the homebrew package manager.

Output from my compilers is as follows:
laserson@hobbes:~$ gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~89/src/configure --disable-checking
--enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10-
--host=x86_64-apple-darwin10 --target=i686-apple-darwin10
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)

laserson@hobbes:~$ g++ -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~89/src/configure --disable-checking
--enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10-
--host=x86_64-apple-darwin10 --target=i686-apple-darwin10
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)

laserson@hobbes:~$ gfortran -v
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /Builds/unix/gcc/gcc-4.2/configure --prefix=/usr/local
--mandir=/share/man --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--build=i686-apple-darwin8 --host=i686-apple-darwin8
--target=i686-apple-darwin8 --enable-languages=fortran
Thread model: posix
gcc version 4.2.3

I installed numpy and scipy loosely based on the directions here:
http://mail.scipy.org/pipermail/numpy-discussion/2010-August/052227.html

More specifically, after installing gfortran, I downloaded the following
versions of numpy and scipy:
numpy 1.5.1
scipy 0.8.0

I then set the following environment variables:
export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch
x86_64 -framework Accelerate"

Then I built and installed numpy as follows (note: sudo is not needed, as I
took ownership of /usr/local):
python setup.py build --fcompiler=gnu95
python setup.py install

The results of numpy.test() are:
>>> numpy.test()
Running unit tests for numpy
NumPy version 1.5.1
NumPy is installed in
/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/numpy
Python version 2.7.1 (r271:86832, Dec  7 2010, 12:37:47) [GCC 4.2.1 (Apple
Inc. build 5664)]
nose version 0.11.4
....
Ran 3006 tests in 18.312s

OK (KNOWNFAIL=4, SKIP=1)
<nose.result.TextTestResult run=3006 errors=0 failures=0>

Then I installed scipy as follows:
python setup.py build --fcompiler=gnu95
python setup.py install

and ran the tests, giving output:
>>> scipy.test()
Running unit tests for scipy
NumPy version 1.5.1
NumPy is installed in
/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/numpy
SciPy version 0.8.0
SciPy is installed in
/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/scipy
Python version 2.7.1 (r271:86832, Dec  7 2010, 12:37:47) [GCC 4.2.1 (Apple
Inc. build 5664)]
nose version 0.11.4
RuntimeError: module compiled against ABI version 2000000 but this version
of numpy is 1000009
....
Ran 4405 tests in 87.505s

OK (KNOWNFAIL=19, SKIP=28)
<nose.result.TextTestResult run=4405 errors=0 failures=0>

Note the RuntimeError listed above:
RuntimeError: module compiled against ABI version 2000000 but this version
of numpy is 1000009

I can still import scipy fine.  However, I then have a problem after
building matplotlib (GitHub).  I can build it fine:
============================================================================
BUILDING MATPLOTLIB
            matplotlib: 1.0.0
                python: 2.7.1 (r271:86832, Dec  7 2010, 12:37:47)  [GCC
                        4.2.1 (Apple Inc. build 5664)]
              platform: darwin

REQUIRED DEPENDENCIES
                 numpy: 1.5.1
             freetype2: 12.0.6

OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.2.44
               Tkinter: Tkinter: 81008, Tk: 8.5, Tcl: 8.5
                  Gtk+: no
                        * Building for Gtk+ requires pygtk; you must be able
                        * to "import gtk" in your build/install environment
       Mac OS X native: yes
                    Qt: no
                   Qt4: no
                 Cairo: no

However, when I import matplotlib.pyplot, I get:
>>> import matplotlib.pyplot
RuntimeError: module compiled against ABI version 2000000 but this version
of numpy is 1000009
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/pyplot.py",
line 23, in <module>
    from matplotlib.figure import Figure, figaspect
  File
"/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/figure.py",
line 16, in <module>
    import artist
  File
"/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/artist.py",
line 6, in <module>
    from transforms import Bbox, IdentityTransform, TransformedBbox,
TransformedPath
  File
"/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/transforms.py",
line 34, in <module>
    from matplotlib._path import affine_transform
ImportError: numpy.core.multiarray failed to import


However, when I separately try to import numpy.core.multiarray, I have no
problem.

Any ideas?

Thanks!
Uri




On Wed, Dec 8, 2010 at 06:18, Ralf Gommers <ralf.gommers@googlemail.com>wrote:

>
>
> On Wed, Dec 8, 2010 at 4:06 AM, Uri Laserson <laserson@mit.edu> wrote:
>
>> Hi all,
>>
>> I am on a MacMini with Intel processor.  I just installed OS X 10.6 and
>> the latest Xcode that I could download, which included gcc 4.2.  I am using
>> python 2.7 built from source using homebrew.  I installed the gfortran 4.2.3
>> binaries from http://r.research.att.com/tools/.
>>
>> I am trying to install numpy and scipy.  numpy installs fine with or
>> without switching to g++-4.0.  I have successfully installed it using pip
>> and also directly from source from the git repository.
>>
>> Scipy is giving me errors on install (the same errors whether I use pip or
>> try the svn repository).  I installed it successfully yesterday on a new
>> Macbook Air using pip, after changing the symlinks to point to g++-4.0.
>>  However, today on my MacMini, I am getting errors after following the same
>> protocol.
>>
>> The errors I am getting are here:
>> https://gist.github.com/732293
>>
>
> The error indicates that 32 and 64 bit binaries are being mixed. Can you
> tell us the following:
> - what build command you used
> - what Python you are using (from python.org, from Apple, self-compiled?)
> - the output of "gcc -v", "g++ -v" and "gfortran -v"
>
> Ralf
>
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20101213/408c3a3e/attachment-0001.html 


More information about the SciPy-User mailing list