[Numpy-discussion] Problem installing NumPy with Python 3.2.2/MacOS X 10.7.2

Hans-Martin v. Gaudecker hmgaudecker@gmail....
Wed Jan 11 09:12:02 CST 2012


I recently upgraded to Lion and just faced the same problem with both Python 2.7.2 and Python 3.2.2 installed via the python.org installers. My hunch is that the errors are related to the fact that Apple dropped gcc-4.2 from XCode 4.2. I got gcc-4.2 via [1] then, still the same error -- who knows what else got lost in that upgrade... Previous successful builds with gcc-4.2 might have been with XCode 4.1 (or 4.2 installed on top of it).

In the end I decided to re-install both Python versions via homebrew, nicely described here [2] and everything seems to work fine using LLVM. Test outputs for NumPy master under 2.7.2 and 3.2.2 are below in case they are of interest.

Best,
Hans-Martin

[1] https://github.com/kennethreitz/osx-gcc-installer
[2] http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/#numpy




>>> numpy.test()
Running unit tests for numpy
NumPy version 2.0.0.dev-55472ca
NumPy is installed in /usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy
Python version 2.7.2 (default, Jan 11 2012, 15:34:30) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
nose version 1.1.2
........................./usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/core/tests/test_datetime.py:1317: UserWarning: pytz not found, pytz compatibility tests skipped
  warnings.warn("pytz not found, pytz compatibility tests skipped")
......................................................................................................................................................F..................................................................................................................................................................................................................................................................S.........................................................................................................................................................../usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/core/numeric.py:2020: RuntimeWarning: invalid value encountered in absolute
  return all(less_equal(absolute(x-y), atol + rtol * absolute(y)))
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K....................................................................................................K...SK.S.......S........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
======================================================================
FAIL: test_einsum_sums_clongdouble (test_einsum.TestEinSum)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/core/tests/test_einsum.py", line 479, in test_einsum_sums_clongdouble
    self.check_einsum_sums(np.clongdouble);
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/core/tests/test_einsum.py", line 231, in check_einsum_sums
    np.sum(a, axis=0).astype(dtype))
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/testing/utils.py", line 753, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/testing/utils.py", line 677, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 100.0%)
 x: array([[ 48.0+0.0j,  50.0+0.0j,  52.0+0.0j,  54.0+0.0j,  56.0+0.0j,
         58.0+0.0j,  60.0+0.0j,  62.0+0.0j,  64.0+0.0j,  66.0+0.0j,
         68.0+0.0j,  70.0+0.0j,  72.0+0.0j,  74.0+0.0j,  76.0+0.0j,...
 y: array([[ 0.0+0.0j,  1.0+0.0j,  2.0+0.0j,  3.0+0.0j,  4.0+0.0j,  5.0+0.0j,
         6.0+0.0j,  7.0+0.0j,  8.0+0.0j,  9.0+0.0j,  10.0+0.0j,  11.0+0.0j,
         12.0+0.0j,  13.0+0.0j,  14.0+0.0j,  15.0+0.0j],...

======================================================================
FAIL: test_prod (test_defmatrix.TestProperties)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/matrixlib/tests/test_defmatrix.py", line 78, in test_prod
    assert_equal(x.prod(0), matrix([[4,10,18]]))
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/testing/utils.py", line 256, in assert_equal
    return assert_array_equal(actual, desired, err_msg, verbose)
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/testing/utils.py", line 753, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/numpy/testing/utils.py", line 677, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 100.0%)
 x: matrix([[4611686018427387904, 4611686018427387904,          4449894403]])
 y: matrix([[ 4, 10, 18]])

----------------------------------------------------------------------
Ran 3553 tests in 51.254s

FAILED (KNOWNFAIL=3, SKIP=5, failures=2)
<nose.result.TextTestResult run=3553 errors=0 failures=2>





>>> import numpy
>>> numpy.test()
Running unit tests for numpy
NumPy version 2.0.0.dev-55472ca
NumPy is installed in /usr/local/Cellar/python3/3.2.2/lib/python3.2/site-packages/numpy
Python version 3.2.2 (default, Jan 11 2012, 15:30:18) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
nose version 1.1.2
........................./usr/local/Cellar/python3/3.2.2/lib/python3.2/site-packages/numpy/core/tests/test_datetime.py:1317: UserWarning: pytz not found, pytz compatibility tests skipped
  warnings.warn("pytz not found, pytz compatibility tests skipped")
...................................................................................................................................................................................................................................................................................E..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K...........................................................................................................................................................................................................K....................................................................................................K...SK.S.......S............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................./usr/local/Cellar/python3/3.2.2/lib/python3.2/site-packages/numpy/lib/format.py:575: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/vx/v51x110x36zcd9lppn78v0qw0000gn/T/tmpenv3j3'>
  mode=mode, offset=offset)
...........................................................................................................................................................................................................................S............................................................................................................................................................................................................................................................................................................/usr/local/Cellar/python3/3.2.2/lib/python3.2/site-packages/numpy/ma/core.py:4778: RuntimeWarning: invalid value encountered in power
  np.power(out, 0.5, out=out, casting='unsafe')
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
======================================================================
ERROR: test_multiarray.TestFromBuffer.test_empty('', array([], dtype=float64), {})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.2.2/lib/python3.2/site-packages/nose-1.1.2-py3.2.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/local/Cellar/python3/3.2.2/lib/python3.2/site-packages/numpy/core/tests/test_multiarray.py", line 1446, in tst_basic
    assert_array_equal(np.frombuffer(buffer,**kwargs),expected)
AttributeError: 'str' object has no attribute '__buffer__'

----------------------------------------------------------------------
Ran 3552 tests in 44.427s

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




On 18 Dec 2011, at 23:14, numpy-discussion-request@scipy.org wrote:

> Send NumPy-Discussion mailing list submissions to
> 	numpy-discussion@scipy.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://mail.scipy.org/mailman/listinfo/numpy-discussion
> or, via email, send a message with subject or body 'help' to
> 	numpy-discussion-request@scipy.org
> 
> You can reach the person managing the list at
> 	numpy-discussion-owner@scipy.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of NumPy-Discussion digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Problem installing NumPy with Python	3.2.2/MacOS X 10.7.2
>      (McNicol, Adam)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sun, 18 Dec 2011 22:13:48 -0000
> From: "McNicol, Adam" <amcnicol@longroad.ac.uk>
> Subject: Re: [Numpy-discussion] Problem installing NumPy with Python
> 	3.2.2/MacOS X 10.7.2
> To: <numpy-discussion@scipy.org>
> Message-ID: <2128d5dc6c318f2d07c027b5c6c4c0ef5b01bf31@localhost>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi,
> 
> Definitely have the sdk installed. In the Developer/SDKs directory I have one for 10.6 and another for 10.7 - no idea where a second 10.6 would be coming from =(
> 
> 
> Adam.
> 
> 
> -----Original Message-----
> From: numpy-discussion-request@scipy.org [mailto:numpy-discussion-request@scipy.org]
> Sent: Sun 12/18/2011 9:52 PM
> To: numpy-discussion@scipy.org
> Subject: NumPy-Discussion Digest, Vol 63, Issue 55
> 
> Send NumPy-Discussion mailing list submissions to
> 	numpy-discussion@scipy.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://mail.scipy.org/mailman/listinfo/numpy-discussion
> or, via email, send a message with subject or body 'help' to
> 	numpy-discussion-request@scipy.org
> 
> You can reach the person managing the list at
> 	numpy-discussion-owner@scipy.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of NumPy-Discussion digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Problem installing NumPy with Python	3.2.2/MacOS X 10.7.2
>      (McNicol, Adam)
>   2. Re: Problem installing NumPy with Python 3.2.2/MacOS X 10.7.2
>      (Ralf Gommers)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sun, 18 Dec 2011 18:48:47 -0000
> From: "McNicol, Adam" <amcnicol@longroad.ac.uk>
> Subject: Re: [Numpy-discussion] Problem installing NumPy with Python
> 	3.2.2/MacOS X 10.7.2
> To: <numpy-discussion@scipy.org>
> Message-ID: <fd29dc5c77c7ee4f0f0622b3459e91a5d77badc3@localhost>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi Ralf,
> 
> Thanks for the response. I tried reinstalling Xcode 4.2.1 and the GCC/Fortran installer from http://r.research.att.com/tools/ (gcc-42-5666.3-darwin11.pkg) before installing the distribute package that you suggested.
> 
> I then reran the numpy installer being sure to enter the three export lines as suggested on the numpy installation guide for Lion.
> 
> Still no success. I guess I'll just have to wait for more official support for my configuration.
> 
> I have included the output from terminal just in case it is useful as there were a few lines in red that suggest something isn't quite right with something. I have placed ** before the lines that appear in red.
> 
> I appreciate the suggestions,
> 
> Thanks again,
> 
> 
> Adam.
> 
> running build
> running config_cc
> unifing config_cc, config, build_clib, build_ext, build commands --compiler options
> running config_fc
> unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
> running build_src
> build_src
> building py_modules sources
> creating build
> creating build/src.macosx-10.6-intel-3.2
> creating build/src.macosx-10.6-intel-3.2/numpy
> creating build/src.macosx-10.6-intel-3.2/numpy/distutils
> building library "npymath" sources
> customize NAGFCompiler
> **Could not locate executable f95
> customize AbsoftFCompiler
> **Could not locate executable f90
> **Could not locate executable f77
> customize IBMFCompiler
> **Could not locate executable xlf90
> **Could not locate executable xlf
> customize IntelFCompiler
> **Could not locate executable fort
> **Could not locate executable ifc
> customize GnuFCompiler
> **Could not locate executable g77
> customize Gnu95FCompiler
> **Could not locate executable gfortran
> customize G95FCompiler
> **Could not locate executable g95
> customize PGroupFCompiler
> **Could not locate executable pgf90
> **Could not locate executable pgf77
> **don't know how to compile Fortran code on platform 'posix'
> C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
> 
> compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
> gcc-4.2: _configtest.c
> gcc-4.2 _configtest.o -o _configtest
> success!
> removing: _configtest.c _configtest.o _configtest
> customize NAGFCompiler
> customize AbsoftFCompiler
> customize IBMFCompiler
> customize IntelFCompiler
> customize GnuFCompiler
> customize Gnu95FCompiler
> customize G95FCompiler
> customize PGroupFCompiler
> **don't know how to compile Fortran code on platform 'posix'
> customize NAGFCompiler
> customize AbsoftFCompiler
> customize IBMFCompiler
> customize IntelFCompiler
> customize GnuFCompiler
> customize Gnu95FCompiler
> customize G95FCompiler
> customize PGroupFCompiler
> **don't know how to compile Fortran code on platform 'posix'
> C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
> 
> compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
> gcc-4.2: _configtest.c
> _configtest.c:1: warning: conflicting types for built-in function ?exp?
> _configtest.c:1: warning: conflicting types for built-in function ?exp?
> gcc-4.2 _configtest.o -o _configtest
> success!
> removing: _configtest.c _configtest.o _configtest
> creating build/src.macosx-10.6-intel-3.2/numpy/core
> creating build/src.macosx-10.6-intel-3.2/numpy/core/src
> creating build/src.macosx-10.6-intel-3.2/numpy/core/src/npymath
> conv_template:> build/src.macosx-10.6-intel-3.2/numpy/core/src/npymath/npy_math.c
> conv_template:> build/src.macosx-10.6-intel-3.2/numpy/core/src/npymath/ieee754.c
> conv_template:> build/src.macosx-10.6-intel-3.2/numpy/core/src/npymath/npy_math_complex.c
> building extension "numpy.core._sort" sources
> Generating build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h
> customize NAGFCompiler
> customize AbsoftFCompiler
> customize IBMFCompiler
> customize IntelFCompiler
> customize GnuFCompiler
> customize Gnu95FCompiler
> customize G95FCompiler
> customize PGroupFCompiler
> **don't know how to compile Fortran code on platform 'posix'
> customize NAGFCompiler
> customize AbsoftFCompiler
> customize IBMFCompiler
> customize IntelFCompiler
> customize GnuFCompiler
> customize Gnu95FCompiler
> customize G95FCompiler
> customize PGroupFCompiler
> **don't know how to compile Fortran code on platform 'posix'
> C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
> 
> compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
> gcc-4.2: _configtest.c
> In file included from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
>                 from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
>                 from _configtest.c:1:
> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
> In file included from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
>                 from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
>                 from _configtest.c:1:
> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
> lipo: can't figure out the architecture type of: /var/folders/_c/z033hf1s1cgfcxtxfnpg0lsm0000gn/T//ccKv548x.out
> In file included from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
>                 from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
>                 from _configtest.c:1:
> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
> In file included from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
>                 from /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
>                 from _configtest.c:1:
> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
> lipo: can't figure out the architecture type of: /var/folders/_c/z033hf1s1cgfcxtxfnpg0lsm0000gn/T//ccKv548x.out
> failure.
> removing: _configtest.c _configtest.o
> Running from numpy source directory.Traceback (most recent call last):
>  File "setup.py", line 196, in <module>
>    setup_package()
>  File "setup.py", line 189, in setup_package
>    configuration=configuration )
>  File "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/core.py", line 186, in setup
>    return old_setup(**new_attr)
>  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/core.py", line 148, in setup
>    dist.run_commands()
>  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 917, in run_commands
>    self.run_command(cmd)
>  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
>    cmd_obj.run()
>  File "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build.py", line 37, in run
>    old_build.run(self)
>  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/command/build.py", line 126, in run
>    self.run_command(cmd_name)
>  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/cmd.py", line 313, in run_command
>    self.distribution.run_command(command)
>  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
>    cmd_obj.run()
>  File "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build_src.py", line 152, in run
>    self.build_sources()
>  File "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build_src.py", line 169, in build_sources
>    self.build_extension_sources(ext)
>  File "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build_src.py", line 328, in build_extension_sources
>    sources = self.generate_sources(sources, ext)
>  File "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build_src.py", line 385, in generate_sources
>    source = func(extension, build_dir)
>  File "numpy/core/setup.py", line 410, in generate_config_h
>    moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
>  File "numpy/core/setup.py", line 41, in check_types
>    out = check_types(*a, **kw)
>  File "numpy/core/setup.py", line 271, in check_types
>    "Cannot compile 'Python.h'. Perhaps you need to "\
> SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
> 
> 
> 
> Message: 3
> Date: Sun, 18 Dec 2011 09:49:00 +0100
> From: Ralf Gommers <ralf.gommers@googlemail.com>
> Subject: Re: [Numpy-discussion] Problem installing NumPy with Python
> 	3.2.2/MacOS X 10.7.2
> To: Discussion of Numerical Python <numpy-discussion@scipy.org>
> Message-ID:
> 	<CABL7CQh-+t+6p5z_S_JVycRCB-FWK0Q3wiAWjazgmDp8AJkKqw@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> On Sat, Dec 17, 2011 at 12:59 PM, McNicol, Adam <amcnicol@longroad.ac.uk>wrote:
> 
>> **
>> 
>> Hi There,
>> 
>> Thanks for the responses.
>> 
>> At this point I would settle from just being able to install matplotlib.
>> Even if some of the functionality isn't present currently that is fine.
>> 
>> I'm afraid my knowledge of Python falls down about here as well. I
>> installed Python 3.2.2 via the installer from Python.org so I have no idea
>> whether Python.h is present or where indeed I would find it or how I would
>> add it to the search path.
>> 
>> Do I have to install from source or something like that?
>> 
> 
> No, your Python install should be fine if you just got the dmg installer
> from python.org. I recommend you install the OS X SDKs and distribute (
> http://pypi.python.org/pypi/distribute), as I said before, and try again to
> compile numpy.
> 
> Unfortunately you have chosen a difficult combination of OS and Python
> version, so we don't have binary installers you can use (yet).
> 
> Ralf
> 
> 
>> Thanks again,
>> 
>> 
>> Adam.
>> 
>> 
>> -----Original Message-----
>> From: McNicol, Adam
>> Sent: Fri 12/16/2011 11:07 PM
>> To: numpy-discussion@scipy.org
>> Subject: Problem installing NumPy with Python 3.2.2/MacOS X 10.7.2
>> 
>> Hi There,
>> 
>> I am very new to numpy and have really only started investigating it as
>> one of my students needs some functionality from matplotlib. I have managed
>> to install everything under Windows for work in class but I use a Mac at
>> home and have been struggling all night to get it to build and install.
>> 
>> I should mention that I am using Python 3.2.2 both in school and at home
>> and it isn't an option to use Python 2.7 as all of the rest of my class is
>> taught in Python 3. I also have the most recent version of Xcode installed.
>> 
>> I have installed the correct build of gcc-4.2 with Fortran (gcc-4.2 (Apple
>> build 5666.3) with GNU Fortran 4.2.4 for Mac OS X 10.7 (Lion)) from
>> http://r.research.att.com/tools/
>> 
>> I then followed the install instructions but the build fails with the
>> following message:
>> 
>>  File "numpy/core/setup.py", line 271, in check_types
>>    "Cannot compile 'Python.h'. Perhaps you need to "\
>> SystemError: Cannot compile 'Python.h'. Perhaps you need to install
>> python-dev|python-devel.
>> 
>> I have got no idea what to do with this error message. Any help would be
>> much appreciated.
>> 
>> Kind Regards,
>> 
>> 
>> Adam.
>> 
>> 
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion@scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>> 
>> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111218/0747fb12/attachment-0001.html 
> 
> ------------------------------
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 
> 
> End of NumPy-Discussion Digest, Vol 63, Issue 54
> ************************************************
> 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/ms-tnef
> Size: 7394 bytes
> Desc: not available
> Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111218/02269314/attachment-0001.bin 
> 
> ------------------------------
> 
> Message: 2
> Date: Sun, 18 Dec 2011 22:53:35 +0100
> From: Ralf Gommers <ralf.gommers@googlemail.com>
> Subject: Re: [Numpy-discussion] Problem installing NumPy with Python
> 	3.2.2/MacOS X 10.7.2
> To: Discussion of Numerical Python <numpy-discussion@scipy.org>
> Message-ID:
> 	<CABL7CQgYJWK2ejek0fbQbs2tjT60kHPQjtPuPBTAX4-doT7YtA@mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
> 
> On Sun, Dec 18, 2011 at 7:48 PM, McNicol, Adam <amcnicol@longroad.ac.uk>wrote:
> 
>> Hi Ralf,
>> 
>> Thanks for the response. I tried reinstalling Xcode 4.2.1 and the
>> GCC/Fortran installer from http://r.research.att.com/tools/(gcc-42-5666.3-darwin11.pkg) before installing the distribute package that
>> you suggested.
>> 
>> I then reran the numpy installer being sure to enter the three export
>> lines as suggested on the numpy installation guide for Lion.
>> 
>> Still no success. I guess I'll just have to wait for more official support
>> for my configuration.
>> 
>> I have included the output from terminal just in case it is useful as
>> there were a few lines in red that suggest something isn't quite right with
>> something. I have placed ** before the lines that appear in red.
>> 
>> Your compile flags have "-isysroot /Developer/SDKs/MacOSX10.6.sdk" in it
> twice. Can you confirm you have installed this SDK? If so, I think the
> problem is that it appears twice. Not sure what's causing it though.
> 
> Ralf
> 
> 
> I appreciate the suggestions,
>> 
>> Thanks again,
>> 
>> 
>> Adam.
>> 
>> running build
>> running config_cc
>> unifing config_cc, config, build_clib, build_ext, build commands
>> --compiler options
>> running config_fc
>> unifing config_fc, config, build_clib, build_ext, build commands
>> --fcompiler options
>> running build_src
>> build_src
>> building py_modules sources
>> creating build
>> creating build/src.macosx-10.6-intel-3.2
>> creating build/src.macosx-10.6-intel-3.2/numpy
>> creating build/src.macosx-10.6-intel-3.2/numpy/distutils
>> building library "npymath" sources
>> customize NAGFCompiler
>> **Could not locate executable f95
>> customize AbsoftFCompiler
>> **Could not locate executable f90
>> **Could not locate executable f77
>> customize IBMFCompiler
>> **Could not locate executable xlf90
>> **Could not locate executable xlf
>> customize IntelFCompiler
>> **Could not locate executable fort
>> **Could not locate executable ifc
>> customize GnuFCompiler
>> **Could not locate executable g77
>> customize Gnu95FCompiler
>> **Could not locate executable gfortran
>> customize G95FCompiler
>> **Could not locate executable g95
>> customize PGroupFCompiler
>> **Could not locate executable pgf90
>> **Could not locate executable pgf77
>> **don't know how to compile Fortran code on platform 'posix'
>> C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g
>> -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64
>> -isysroot /Developer/SDKs/MacOSX10.6.sdk
>> 
>> compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
>> -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath
>> -Inumpy/core/include
>> -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
>> gcc-4.2: _configtest.c
>> gcc-4.2 _configtest.o -o _configtest
>> success!
>> removing: _configtest.c _configtest.o _configtest
>> customize NAGFCompiler
>> customize AbsoftFCompiler
>> customize IBMFCompiler
>> customize IntelFCompiler
>> customize GnuFCompiler
>> customize Gnu95FCompiler
>> customize G95FCompiler
>> customize PGroupFCompiler
>> **don't know how to compile Fortran code on platform 'posix'
>> customize NAGFCompiler
>> customize AbsoftFCompiler
>> customize IBMFCompiler
>> customize IntelFCompiler
>> customize GnuFCompiler
>> customize Gnu95FCompiler
>> customize G95FCompiler
>> customize PGroupFCompiler
>> **don't know how to compile Fortran code on platform 'posix'
>> C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g
>> -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64
>> -isysroot /Developer/SDKs/MacOSX10.6.sdk
>> 
>> compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
>> -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath
>> -Inumpy/core/include
>> -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
>> gcc-4.2: _configtest.c
>> _configtest.c:1: warning: conflicting types for built-in function ?exp?
>> _configtest.c:1: warning: conflicting types for built-in function ?exp?
>> gcc-4.2 _configtest.o -o _configtest
>> success!
>> removing: _configtest.c _configtest.o _configtest
>> creating build/src.macosx-10.6-intel-3.2/numpy/core
>> creating build/src.macosx-10.6-intel-3.2/numpy/core/src
>> creating build/src.macosx-10.6-intel-3.2/numpy/core/src/npymath
>> conv_template:>
>> build/src.macosx-10.6-intel-3.2/numpy/core/src/npymath/npy_math.c
>> conv_template:>
>> build/src.macosx-10.6-intel-3.2/numpy/core/src/npymath/ieee754.c
>> conv_template:>
>> build/src.macosx-10.6-intel-3.2/numpy/core/src/npymath/npy_math_complex.c
>> building extension "numpy.core._sort" sources
>> Generating
>> build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h
>> customize NAGFCompiler
>> customize AbsoftFCompiler
>> customize IBMFCompiler
>> customize IntelFCompiler
>> customize GnuFCompiler
>> customize Gnu95FCompiler
>> customize G95FCompiler
>> customize PGroupFCompiler
>> **don't know how to compile Fortran code on platform 'posix'
>> customize NAGFCompiler
>> customize AbsoftFCompiler
>> customize IBMFCompiler
>> customize IntelFCompiler
>> customize GnuFCompiler
>> customize Gnu95FCompiler
>> customize G95FCompiler
>> customize PGroupFCompiler
>> **don't know how to compile Fortran code on platform 'posix'
>> C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g
>> -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64
>> -isysroot /Developer/SDKs/MacOSX10.6.sdk
>> 
>> compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
>> -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath
>> -Inumpy/core/include
>> -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
>> gcc-4.2: _configtest.c
>> In file included from
>> /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
>>                from
>> /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
>>                from _configtest.c:1:
>> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h:
>> No such file or directory
>> In file included from
>> /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
>>                from
>> /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
>>                from _configtest.c:1:
>> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h:
>> No such file or directory
>> lipo: can't figure out the architecture type of:
>> /var/folders/_c/z033hf1s1cgfcxtxfnpg0lsm0000gn/T//ccKv548x.out
>> In file included from
>> /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
>>                from
>> /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
>>                from _configtest.c:1:
>> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h:
>> No such file or directory
>> In file included from
>> /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/bytearrayobject.h:9,
>>                from
>> /Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:73,
>>                from _configtest.c:1:
>> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h:
>> No such file or directory
>> lipo: can't figure out the architecture type of:
>> /var/folders/_c/z033hf1s1cgfcxtxfnpg0lsm0000gn/T//ccKv548x.out
>> failure.
>> removing: _configtest.c _configtest.o
>> Running from numpy source directory.Traceback (most recent call last):
>> File "setup.py", line 196, in <module>
>>   setup_package()
>> File "setup.py", line 189, in setup_package
>>   configuration=configuration )
>> File
>> "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/core.py",
>> line 186, in setup
>>   return old_setup(**new_attr)
>> File
>> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/core.py",
>> line 148, in setup
>>   dist.run_commands()
>> File
>> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py",
>> line 917, in run_commands
>>   self.run_command(cmd)
>> File
>> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py",
>> line 936, in run_command
>>   cmd_obj.run()
>> File
>> "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build.py",
>> line 37, in run
>>   old_build.run(self)
>> File
>> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/command/build.py",
>> line 126, in run
>>   self.run_command(cmd_name)
>> File
>> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/cmd.py",
>> line 313, in run_command
>>   self.distribution.run_command(command)
>> File
>> "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py",
>> line 936, in run_command
>>   cmd_obj.run()
>> File
>> "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build_src.py",
>> line 152, in run
>>   self.build_sources()
>> File
>> "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build_src.py",
>> line 169, in build_sources
>>   self.build_extension_sources(ext)
>> File
>> "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build_src.py",
>> line 328, in build_extension_sources
>>   sources = self.generate_sources(sources, ext)
>> File
>> "/Users/adammcnicol/Desktop/numpy-1.6.1/build/py3k/numpy/distutils/command/build_src.py",
>> line 385, in generate_sources
>>   source = func(extension, build_dir)
>> File "numpy/core/setup.py", line 410, in generate_config_h
>>   moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
>> File "numpy/core/setup.py", line 41, in check_types
>>   out = check_types(*a, **kw)
>> File "numpy/core/setup.py", line 271, in check_types
>>   "Cannot compile 'Python.h'. Perhaps you need to "\
>> SystemError: Cannot compile 'Python.h'. Perhaps you need to install
>> python-dev|python-devel.
>> 
>> 
>> 
>> Message: 3
>> Date: Sun, 18 Dec 2011 09:49:00 +0100
>> From: Ralf Gommers <ralf.gommers@googlemail.com>
>> Subject: Re: [Numpy-discussion] Problem installing NumPy with Python
>>       3.2.2/MacOS X 10.7.2
>> To: Discussion of Numerical Python <numpy-discussion@scipy.org>
>> Message-ID:
>>       <CABL7CQh-+t+6p5z_S_JVycRCB-FWK0Q3wiAWjazgmDp8AJkKqw@mail.gmail.com
>>> 
>> Content-Type: text/plain; charset="iso-8859-1"
>> 
>> On Sat, Dec 17, 2011 at 12:59 PM, McNicol, Adam <amcnicol@longroad.ac.uk
>>> wrote:
>> 
>>> **
>>> 
>>> Hi There,
>>> 
>>> Thanks for the responses.
>>> 
>>> At this point I would settle from just being able to install matplotlib.
>>> Even if some of the functionality isn't present currently that is fine.
>>> 
>>> I'm afraid my knowledge of Python falls down about here as well. I
>>> installed Python 3.2.2 via the installer from Python.org so I have no
>> idea
>>> whether Python.h is present or where indeed I would find it or how I
>> would
>>> add it to the search path.
>>> 
>>> Do I have to install from source or something like that?
>>> 
>> 
>> No, your Python install should be fine if you just got the dmg installer
>> from python.org. I recommend you install the OS X SDKs and distribute (
>> http://pypi.python.org/pypi/distribute), as I said before, and try again
>> to
>> compile numpy.
>> 
>> Unfortunately you have chosen a difficult combination of OS and Python
>> version, so we don't have binary installers you can use (yet).
>> 
>> Ralf
>> 
>> 
>>> Thanks again,
>>> 
>>> 
>>> Adam.
>>> 
>>> 
>>> -----Original Message-----
>>> From: McNicol, Adam
>>> Sent: Fri 12/16/2011 11:07 PM
>>> To: numpy-discussion@scipy.org
>>> Subject: Problem installing NumPy with Python 3.2.2/MacOS X 10.7.2
>>> 
>>> Hi There,
>>> 
>>> I am very new to numpy and have really only started investigating it as
>>> one of my students needs some functionality from matplotlib. I have
>> managed
>>> to install everything under Windows for work in class but I use a Mac at
>>> home and have been struggling all night to get it to build and install.
>>> 
>>> I should mention that I am using Python 3.2.2 both in school and at home
>>> and it isn't an option to use Python 2.7 as all of the rest of my class
>> is
>>> taught in Python 3. I also have the most recent version of Xcode
>> installed.
>>> 
>>> I have installed the correct build of gcc-4.2 with Fortran (gcc-4.2
>> (Apple
>>> build 5666.3) with GNU Fortran 4.2.4 for Mac OS X 10.7 (Lion)) from
>>> http://r.research.att.com/tools/
>>> 
>>> I then followed the install instructions but the build fails with the
>>> following message:
>>> 
>>>  File "numpy/core/setup.py", line 271, in check_types
>>>    "Cannot compile 'Python.h'. Perhaps you need to "\
>>> SystemError: Cannot compile 'Python.h'. Perhaps you need to install
>>> python-dev|python-devel.
>>> 
>>> I have got no idea what to do with this error message. Any help would be
>>> much appreciated.
>>> 
>>> Kind Regards,
>>> 
>>> 
>>> Adam.
>>> 
>>> 
>>> _______________________________________________
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>> 
>>> 
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>> http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111218/0747fb12/attachment-0001.html
>> 
>> ------------------------------
>> 
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion@scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>> 
>> 
>> End of NumPy-Discussion Digest, Vol 63, Issue 54
>> ************************************************
>> 
>> 
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion@scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>> 
>> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111218/35cbac93/attachment.html 
> 
> ------------------------------
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 
> 
> End of NumPy-Discussion Digest, Vol 63, Issue 55
> ************************************************
> 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/ms-tnef
> Size: 13714 bytes
> Desc: not available
> Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111218/4ae2f625/attachment.bin 
> 
> ------------------------------
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 
> 
> End of NumPy-Discussion Digest, Vol 63, Issue 56
> ************************************************



More information about the NumPy-Discussion mailing list