1
OSX Lion에서 numpy를 빌드하려고합니다. 나는 LDSHARED에 대해 10.7을 10.6으로 대체하여 this post에서 지침을 따랐습니다. 그러나 내가 setup.py를 실행하면 여전히 10.6을 사용하고있는 것처럼 보입니까 ??python3.2를 사용하여 numpy 설치 Mac OSX Lion
어떻게 수정합니까?
[email protected] /Users/Eric/Desktop/numpy-1.7.0b2$ export CC=clang
[email protected] /Users/Eric/Desktop/numpy-1.7.0b2$ export CXX=clang
[email protected] /Users/Eric/Desktop/numpy-1.7.0b2$ export FFLAGS=-ff2c
[email protected] /Users/Eric/Desktop/numpy-1.7.0b2$ export LDSHARED='clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -g'
[email protected] /Users/Eric/Desktop/numpy-1.7.0b2$ python3.2 setup.py build
Converting to Python3 via 2to3...
Running from numpy source directory.
non-existing path in 'numpy/distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
FOUND:
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3)]
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
non-existing path in 'numpy/lib': 'benchmarks'
lapack_opt_info:
FOUND:
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3)]
extra_compile_args = ['-msse3']
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
building library "npymath" sources
customize Gnu95FCompiler
Found executable /usr/local/bin/gfortran
Could not locate executable clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -g
customize Gnu95FCompiler
customize Gnu95FCompiler using config
C compiler: clang -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/src/npysort -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
clang: _configtest.c
clang _configtest.o -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: clang -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/src/npysort -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
clang: _configtest.c
_configtest.c:1:5: warning: incompatible redeclaration of library function 'exp'
int exp (void);
^
_configtest.c:1:5: note: 'exp' is a builtin with type 'double (double)'
1 warning generated.
_configtest.c:1:5: warning: incompatible redeclaration of library function 'exp'
int exp (void);
^
_configtest.c:1:5: note: 'exp' is a builtin with type 'double (double)'
1 warning generated.
clang _configtest.o -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
building library "npysort" sources
building extension "numpy.core._dummy" sources
Generating build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h
C compiler: clang -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/src/npysort -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c'
clang: _configtest.c
In file included from _configtest.c:1:
/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
In file included from _configtest.c:1:
/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
File "setup.py", line 214, in <module>
setup_package()
File "setup.py", line 207, in setup_package
configuration=configuration)
File "/Users/eric/Desktop/numpy-1.7.0b2/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/eric/Desktop/numpy-1.7.0b2/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/eric/Desktop/numpy-1.7.0b2/build/py3k/numpy/distutils/command/build_src.py", line 152, in run
self.build_sources()
File "/Users/eric/Desktop/numpy-1.7.0b2/build/py3k/numpy/distutils/command/build_src.py", line 169, in build_sources
self.build_extension_sources(ext)
File "/Users/eric/Desktop/numpy-1.7.0b2/build/py3k/numpy/distutils/command/build_src.py", line 328, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/Users/eric/Desktop/numpy-1.7.0b2/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.