OK I have it working, thanks Laurent! This is just to tie this thread off for any Googlers coming to this thread trying to install rpy2 on Ubuntu.
I decided to do a completely fresh installation of Ubuntu. This was the exact procedure I used. Some may not be necessary but it worked! 1) Using VMWare workstation (excellent product BTW as you can record snapshots of working configs), create a new Ubuntu VM just using defaults. 2) Install the VMWare tools they recommend. 3) Download all the Ubuntu package updates. 4) Install a binary Ubuntu R from the link Laurent suggested (directions are complete) using http://cran.r-project.org/bin/linux/ubuntu/ cd /etc/apt/ sudo gedit sources.list #(adding the line below but use your own local CRAN mirror) deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu lucid/ 5) sudo apt-get update sudo apt-get install r-base 6) sudo apt-get build-dep r-base 7) Download rpy2 from Sourceforge If I try and install it now it crashes as it is missing dependencies so 8) build dependencies for rpy2 sudo apt-get build-dep rpy2 9) install rpy2 sudo python setup.py install 10) install idle (amazingly Ubuntu do not include this already) sudo apt-get install idle 11) idle then type import rpy2 import rpy2.robjects and NO ERROR! I am amazed at how tricky installing apps is under Linux. So many dependencies. I hope I get used to it but at least I am smiling now. I will save this snapshot in a very safe place in case I ever have to reinstall it some time.... On Fri, Aug 13, 2010 at 3:17 PM, Laurent Gautier <lgaut...@gmail.com> wrote: > > On 8/13/10 6:49 AM, Andrew Walsh wrote: >> >> Under Laurent's advice I stopped using Windows for Rpy2 and took days >> to install Ubuntu Lucid correctly under VMWare exclusively so I could >> use Rpy2 2.1.4 and R in a project I am working on. >> I am a complete newbie to Linux and just an apprentice to Python but >> have 30 years experience with other computing systems. > > Then the easiest to get started is probably to use Dirk's packages, at least > for R: > http://cran.r-project.org/bin/linux/ubuntu/ > >> I followed the instructions exactly although it was not clear if I >> could install R binaries (and save time) or if I had to compile with >> the --enable-R-shlib >> switch. Just to make sure I did the latter and eventually it >> installed without error. After this I installed Rpy2 2.1.4 and it also >> installed without error. >> >> I can do >> >> import rpy2 >> >> but >> >> import rpy2.robjects or import rpy2.rinterface gives the error >> >> ImportError: libR.so: cannot open shared object file: No such file or >> directory >> >> I had a look around the web and found this post that seems to describe >> the same error. >> >> >> http://bitbucket.org/lgautier/rpy2/issue/30/rpy2-210beta2-ubuntu-karmic-librso-not >> >> I can also do R RHOME and it comes up with >> /usr/local/lib/R >> >> In the post above he says: >> "I was able to fix the problem by creating a link to libR.so in >> /usr/local/lib, as suggested in the FAQ" >> >> Ah this looks promising but as a newbie to Linux I have no idea how to do >> this. >> In the FAQ it says >> >> "make a link to R_HOME/bin/libR.so in /usr/local/lib, or in some other >> location that your system knows as a standard place for libraries; >> then run 'ldconfig' as root; " >> >> which is no more help to a Linux newbie. >> I figure I have to obviously let Linux to understand the link to >> LibR.so, which is in >> /usr/local/lib/R/lib ... Aug 2010 >> and >> /usr/lib/R/lib ... Jan 2010 >> >> but I do not understand how to carry out the above task. >> I guess this must be very easy since exact directions are not given >> but none of the various things I have tried have worked. >> All help and comments appreciated. >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by >> >> Make an app they can't live without >> Enter the BlackBerry Developer Challenge >> http://p.sf.net/sfu/RIM-dev2dev >> _______________________________________________ >> rpy-list mailing list >> rpy-list@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rpy-list > > ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list