Entradas no planeta de alcides


  • Alcides Fonseca

    How to install the R python bindings library RPy2 on Mac OS 10.6 Snow Leopard using Homebrew.

    Install R

    In order to install R in your Mac as a framework, make this change in your homebrew/Library/Formula

    brew install r

    Install RPy2

    wget http://pypi.python.org/packages/source/r/rpy2/rpy2-2.1.4.tar.gz#md5=cf4e0d80ba498a6d76f107531966478d
    tar xfz rpy2-2.1.4.tar.gz
    cd rpy2-2.1.4/
    sudo python setup.py build --r-home /usr/local/Cellar/r/2.11.1/R.framework/Resources/ install
    

    Troubleshooting

    If you are having a problem related to “-framework vecLib” when installing rpy2, insert a new line after #134 of setup.py with the following:

    extra_link_args = extra_link_args[:-1]

    Worked for me.

  • Alcides Fonseca

    Package Install

    Nuno Lourenço created a PIL package for Python 2.6 on OS X.

    Compilation

    How to install PIL (Python Image Library) in Snow Leopard with freetype2 and libjpg support.

    Libjpg

    brew install jpeg Or download source and compile.

    Freetype2

    wget http://mirrors.fe.up.pt/pub/nongnu/freetype/freetype-2.1.10.tar.gz

    tar -zxvf freetype-2.1.10.tar.gz && cd freetype-2.1.10

    ./configure && make && sudo make install

    PIL

    wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz

    tar -zxvf Imaging-1.1.6.tar.gz && cd Imaging-1.1.6/

    Open setup.py and change JPEG_ROOT and FREETYPE_ROOT to:

    FREETYPE_ROOT = libinclude("/usr/local")

    JPEG_ROOT = libinclude("/Users/alcides/Code/Support/homebrew/Cellar/jpeg/7")

    Finally, sudo python setup.py install