0

I am trying to install the python package biopython from source on my Macbook pro OSX 10.9.4,

I run python setup.py build in the terminal and receive this

running build
running build_py
running build_ext
building 'Bio.cpairwise2' extension
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
Please check your Xcode installation
gcc -DNDEBUG -g -O3 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -Qunused-arguments -Qunused-arguments -I/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c Bio/cpairwise2module.c -o build/temp.macosx-10.6-x86_64-2.7/Bio/cpairwise2module.o
clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.6.sdk'
In file included from Bio/cpairwise2module.c:12:
/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-    x86_64/Canopy.app/Contents/include/python2.7/Python.h:33:10: fatal error: 
  'stdio.h' file not found
#include <stdio.h>
     ^
1 error generated.
error: command 'gcc' failed with exit status 1

I checked that Xcode should be properly installed and working

jensjorda
  • 183
  • 2
  • 3
  • 10
  • possible duplicate of [Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk](http://stackoverflow.com/questions/13178686/compiling-with-an-sdk-that-doesnt-seem-to-exist-developer-sdks-macosx10-6-sdk) – William Denman Sep 17 '14 at 14:33
  • I don't think so since that thread is related to a python 3 installation. Rather this problem might be related to the canopy installation of python used. – jensjorda Sep 17 '14 at 14:58
  • Quite possibly a canopy bug. Have you tried a barebones approach? Try installing python/pip via Homebrew. – William Denman Sep 17 '14 at 15:10

3 Answers3

1

You should be using pip. Try:

pip install biopython

William Denman
  • 3,046
  • 32
  • 34
1

Uninstalled Canopy and everything worked like a charm...

jensjorda
  • 183
  • 2
  • 3
  • 10
0

Try installing the Biopython version available from the Canopy "Package Manager" > "Available Packages" > "Canopy Packages".

This way, I seem to have solved a similar problem while installing Pyensembl, that also installs Biopython.