2013-06-08 6 views
2

numpy를 설치하려고 시도한 후 그 뒤에 biopython을 설치할 수 있습니다. 나는 이미 Pyton 2.7을 설치했고 명령 프롬프트에 python을 입력하면 다음과 같은 결과를 얻었습니다.numpy가 macosx에 설치되지 않았습니다

python 
Python 2.7.4 (v2.7.4:026ee0057e2d, Apr 6 2013, 10:15:50) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 

그래서 C 컴파일러가 있습니다. 지금은 NumPy와의를 .tar를 다운로드하고 다음 단계를 TDO 때

> tar -xzvpf numpy-1.5.1.tar.gz 
> cd numpy-1.5.1/ 
> python setup.py build 

나는 follwing을 오류 얻을 : 무슨 일이야

Traceback (most recent call last): 
    File "setupegg.py", line 17, in <module> 
    from setuptools import setup 
ImportError: No module named setuptools 
maziz1-ml:numpy-1.5.1 maziz$ sudo python setupegg.py 
Traceback (most recent call last): 
    File "setupegg.py", line 17, in <module> 
    from setuptools import setup 
ImportError: No module named setuptools 
maziz1-ml:numpy-1.5.1 maziz$ sudo python setup.py install 
Running from numpy source directory.non-existing path in 'numpy/distutils': 'site.cfg' 
F2PY Version 1 
blas_opt_info: 
    FOUND: 
    extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] 
    define_macros = [('NO_ATLAS_INFO', 3)] 
    extra_compile_args = ['-faltivec', '-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 = ['-faltivec'] 

running install 
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 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 ifort 
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 
don't know how to compile Fortran code on platform 'posix' 
C compiler: /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -g -O2 -DNDEBUG -g -O3 

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/2.7/include/python2.7 -c' 
clang: _configtest.c 
/usr/bin/clang _configtest.o -o _configtest 
ld: warning: ignoring file _configtest.o, file was built for i386 which is not the architecture being linked (x86_64): _configtest.o 
Undefined symbols for architecture x86_64: 
    "_main", referenced from: 
    implicit entry/start for main executable 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
ld: warning: ignoring file _configtest.o, file was built for i386 which is not the architecture being linked (x86_64): _configtest.o 
Undefined symbols for architecture x86_64: 
    "_main", referenced from: 
    implicit entry/start for main executable 
ld: symbol(s) not found for architecture x86_64 
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 "setup.py", line 211, in <module> 
    setup_package() 
    File "setup.py", line 204, in setup_package 
    configuration=configuration) 
    File "/Library/Python/2.7/site-packages/numpy-1.5.1/numpy/distutils/core.py", line 186, in setup 
    return old_setup(**new_attr) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup 
    dist.run_commands() 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands 
    self.run_command(cmd) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command 
    cmd_obj.run() 
    File "/Library/Python/2.7/site-packages/numpy-1.5.1/numpy/distutils/command/install.py", line 55, in run 
    r = old_install.run(self) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 563, in run 
    self.run_command('build') 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command 
    self.distribution.run_command(command) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command 
    cmd_obj.run() 
    File "/Library/Python/2.7/site-packages/numpy-1.5.1/numpy/distutils/command/build.py", line 37, in run 
    old_build.run(self) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run 
    self.run_command(cmd_name) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command 
    self.distribution.run_command(command) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command 
    cmd_obj.run() 
    File "/Library/Python/2.7/site-packages/numpy-1.5.1/numpy/distutils/command/build_src.py", line 152, in run 
    self.build_sources() 
    File "/Library/Python/2.7/site-packages/numpy-1.5.1/numpy/distutils/command/build_src.py", line 163, in build_sources 
    self.build_library_sources(*libname_info) 
    File "/Library/Python/2.7/site-packages/numpy-1.5.1/numpy/distutils/command/build_src.py", line 298, in build_library_sources 
    sources = self.generate_sources(sources, (lib_name, build_info)) 
    File "/Library/Python/2.7/site-packages/numpy-1.5.1/numpy/distutils/command/build_src.py", line 385, in generate_sources 
    source = func(extension, build_dir) 
    File "numpy/core/setup.py", line 683, in get_mathlib_info 
    raise RuntimeError("Broken toolchain: cannot link a simple C program") 

어떤 아이디어? 감사합니다.

+0

setuptools를 설치 했습니까? 처음 몇 줄은 당신이하지 않는다는 것을 의미합니다. osx를 실행하고'setuptools'를 설치 한 다음'easy_install numpy'을 실행했습니다. – tom10

답변

1

포트란 컴파일러와 setuptools가 누락 된 것 같습니다. 개발자 도구 (Xcode 또는 독립 실행 형 명령 줄 도구)를 설치 했습니까? setuptools에는 비슷한 답변이 이미 게시되어 있습니다. 그냥 구글 오류 메시지. 난 그냥 간단한 설치 프로그램을 통해 파이썬 과학 스택의 대부분을 얻을 수있는 연속체 아나콘다의 분포를보고 가능한 추천했다

: 그것은 바이오 파이썬 함께 제공

https://store.continuum.io/cshop/anaconda/

포함하고 무료입니다. 다른 방법으로도 바이오 파이썬을 포함 Enthought 파이썬 유통이 : sourceforge 내 파이썬 2.7을 일치 간단하게 설치 최신 버전을 다운로드 :

https://enthought.com/products/epd/package-index/

+0

.yes 나는 Xcode를 설치했다. 파이썬 2.7을 이미 설치했고 donot이 다시 설치하려고합니다. numpy 및 biopython을 설치하는 방법 찾기 – RnD

2

이 있었다 내 솔루션에 이동합니다. 감사합니다.

관련 문제