não consigo instalar numpy no mac os x 10.7 com pip e homebrew falha

1

Estou tentando instalar o numpy no meu Mac executando 10.7.5

Eu fiz o seguinte comando

sudo /usr/local/bin/python /usr/local/bin/pip install numpy

e o erro é algo relacionado com ld: library not found for -lcrt1.10.6.o Aqui está a saída completa:

sudo /usr/local/bin/python /usr/local/bin/pip install numpy

Downloading/unpacking numpy
  Running setup.py egg_info for package numpy
    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']

    lapack_opt_info:
      FOUND:
        extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
        define_macros = [('NO_ATLAS_INFO', 3)]
        extra_compile_args = ['-msse3']

build_src
building py_modules sources
building library "npymath" sources
customize Gnu95FCompiler
Found executable /usr/local/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using config
C compiler: xcrun clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes

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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
xcrun: _configtest.c
xcrun clang _configtest.o -o _configtest
ld: library not found for -lcrt1.10.6.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: library not found for -lcrt1.10.6.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
  File "<string>", line 16, in <module>
  File "/private/tmp/pip-build-root/numpy/setup.py", line 214, in <module>
    setup_package()
  File "/private/tmp/pip-build-root/numpy/setup.py", line 207, in setup_package
    configuration=configuration )
  File "/private/tmp/pip-build-root/numpy/numpy/distutils/core.py", line 186, in setup
    return old_setup(**new_attr)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/egg_info.py", line 8, in run
    self.run_command("build_src")
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/build_src.py", line 152, in run
    self.build_sources()
  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/build_src.py", line 163, in build_sources
    self.build_library_sources(*libname_info)
  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/build_src.py", line 298, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/build_src.py", line 385, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 648, in get_mathlib_info
    raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
Complete output from command python setup.py egg_info:
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']



lapack_opt_info:

FOUND:

extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']

define_macros = [('NO_ATLAS_INFO', 3)]

extra_compile_args = ['-msse3']



running egg_info

running build_src

build_src

building py_modules sources

building library "npymath" sources

customize Gnu95FCompiler

Found executable /usr/local/bin/gfortran

customize Gnu95FCompiler

customize Gnu95FCompiler using config

C compiler: xcrun clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes



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/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'

xcrun: _configtest.c

xcrun clang _configtest.o -o _configtest

ld: library not found for -lcrt1.10.6.o

clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld: library not found for -lcrt1.10.6.o

clang: error: linker command failed with exit code 1 (use -v to see invocation)

failure.

removing: _configtest.c _configtest.o

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/private/tmp/pip-build-root/numpy/setup.py", line 214, in <module>

setup_package()

  File "/private/tmp/pip-build-root/numpy/setup.py", line 207, in setup_package

configuration=configuration )

  File "/private/tmp/pip-build-root/numpy/numpy/distutils/core.py", line 186, in setup

return old_setup(**new_attr)

  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup

dist.run_commands()

  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands

self.run_command(cmd)

  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

    cmd_obj.run()

  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/egg_info.py", line 8, in run

    self.run_command("build_src")

  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command

self.distribution.run_command(command)

  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

cmd_obj.run()

  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/build_src.py", line 152, in run

    self.build_sources()

  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/build_src.py", line 163, in build_sources

self.build_library_sources(*libname_info)

  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/build_src.py", line 298, in build_library_sources

sources = self.generate_sources(sources, (lib_name, build_info))

  File "/private/tmp/pip-build-root/numpy/numpy/distutils/command/build_src.py", line 385, in generate_sources

source = func(extension, build_dir)

  File "numpy/core/setup.py", line 648, in get_mathlib_info

raise RuntimeError("Broken toolchain: cannot link a simple C program")

RuntimeError: Broken toolchain: cannot link a simple C program

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip-build-root/numpy
Storing complete log in /Users/thomasrasilier/.pip/pip.log

alguma ideia? Obrigado

    
por otmezger 20.03.2013 / 11:47

1 resposta

1

Eu finalmente encontrei o caminho para fazer este trabalho ... mais com tentativa e erro do que realmente entender ...

Isso funcionou:

cd /usr/lib
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/crt1.10.6.o 

Agora posso instalar o numpy com

sudo pip install numpy
    
por 20.03.2013 / 14:40