нахиляє встановити Numpy на Mac OS X 10.7 з PIP і домороще не вдається


1

Я намагаюся встановити numpy на моєму Mac працює 10.7.5

Я зробив наступну команду

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

і помилка щось пов'язане з ld: library not found for -lcrt1.10.6.o Ось повний вихід:

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

якісь ідеї? Дякую



жодне з ідей там дійсно не працювало
otmezger

Відповіді:


1

Я нарешті знайшов спосіб зробити цю роботу ... більше з спробою і помилкою, ніж дійсно розуміння ...

Це зробило завдання:

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 

Тепер я можу встановити numpy с

sudo pip install numpy

Мені також потрібно, щоб зв'язати ряд інших бібліотек (як 5 в цілому) ... дуже дивно, що він не дивився в потрібну папку ... може тому, що він був на OS X 10.7, а не 10.8?
otmezger
Використовуючи наш веб-сайт, ви визнаєте, що прочитали та зрозуміли наші Політику щодо файлів cookie та Політику конфіденційності.
Licensed under cc by-sa 3.0 with attribution required.