3

I'm trying to install rpy2 for Python3 with the following command:

easy_install-3.2 rpy2

This gives a few warnings and an error:

warning: no previously-included files matching '*patch*' found anywhere in distribution
warning: no previously-included files matching '*diff*' found anywhere in distribution
warning: no previously-included files matching '.hg' found anywhere in distribution
no previously-included directories found matching 'dist'
gcc-4.2 not found, using clang instead
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
Please check your Xcode installation
build/python3_rpy/rpy/rinterface/_rinterface.c:51:10: fatal error: 'signal.h' file not found
#include <signal.h>
         ^
1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1

The file /Developer/SDKs/MacOSX10.6.sdk seems to be missing even though I have xcode 4.5.1 installed.

There is no file called MacOSX10.6.sdk in the "Downloads for Apple Developers" on the Apple home page. What do I do?

Ps. It all works well if I do not specify python3.

The Unfun Cat
  • 29,987
  • 31
  • 114
  • 156
  • What is shown when you run `xcode-select -print-path`? Also how was python installed on your system? – trojanfoe Nov 01 '12 at 14:12
  • @trojanfoe xcode-select -print-path gives /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer and python3 was gotten from http://python.org/download/ (I have the 64 bit osx version) – The Unfun Cat Nov 01 '12 at 15:52
  • I found a similar thread http://stackoverflow.com/questions/2169987/python2-6-and-snow-leopard-problem-installing-appscript-and-many-other-package but the solution there is downloading the file MacOSX10.4u.sdk, but no equivalent file exists for 10.6 – The Unfun Cat Nov 01 '12 at 15:57

1 Answers1

3

What is happening is that python was built with a pre-4.3 version of Xcode where the tools and SDKs were installed in /Developer. This is no longer the case with Xcode 4.3 where the tools and SDKs are part of the Xcode.app bundle. It also looks like python was compiled using gcc rather than clang.

I would recommend dumping the installation of python3 you have and installing it via macports, which will use the latest Xcode to build its ports and will therefore be able to compile additional python modules.

Once you have installed macports, simply do:

$ sudo port install python33

There is also a good chance those python modules can be installed by simply doing:

$ sudo port install whizzopymod

EDIT: Scratch that last part as macports doesn't have rpy2 for python3. You'll have to continue using easy_install I guess.

trojanfoe
  • 120,358
  • 21
  • 212
  • 242
  • Thanks. I'm unable to uninstall the symbolic links for Python3 ("permission denied", even with sudo). Will I need to do this before reinstalling it? Will accept answer soon, just need to try it first. – The Unfun Cat Nov 01 '12 at 16:22
  • @TheUnfunCat This might help: http://stackoverflow.com/questions/5621952/uninstall-python-3-2-on-mac-os-x-10-6-7 – trojanfoe Nov 01 '12 at 16:24
  • 1
    @TheUnfunCat: Do stick to the part of the answer that specifies Python 3.3. Rpy2 was not tested under Python 3.2 (at this point in time, the lifespan of Python 3.2 is probably relatively short - 3.3 is the way to go now) – lgautier Nov 01 '12 at 18:19