Solved

How do I install rpy2 for Python on my Mac?

Posted on 2010-09-17
2
699 Views
Last Modified: 2013-11-12
I am trying to install rpy2 for Python on my Mac (OS X Snow Leopard)  I used MacPorts to do the initial port of rpy2.  But from there, I have absolutely no idea what I need to do.  I need step by step instructions.  I am a novice Mac user and still very wet behind the ears in terms of directories, installing programs, etc.  I would appreciate any help.

Many thanks!
0
Comment
Question by:kmartinenko
2 Comments
 
LVL 19

Accepted Solution

by:
pheidius earned 500 total points
ID: 33713946
Make sure latest version of Xtools/Python/R is installed correctly,

Download and install easyinstall and let it find the right Egg for you. if it gets trickier  than that then i excerpted some tips below


http://peak.telecommunity.com/DevCenter/EasyInstall
If you are on a Mac OS X machine, you should just use the ~/Library/Python/2.x/site-packages directory as your custom installation location, because it is already configured to process .pth files, and EasyInstall already knows this.

Before installing EasyInstall/setuptools, just create a ~/.pydistutils.cfg file with the following contents (or add this to the existing contents):

another good link if easy instal get trickier
http://arstechnica.com/civis/viewtopic.php?f=20&t=67946

[install]
install_lib = ~/Library/Python/$py_version_short/site-packages
install_scripts = ~/bin

This will tell the distutils and EasyInstall to always install packages in your personal site-packages directory, and scripts to ~/bin. (Note: do not replace $py_version_short with an actual Python version in the configuration file! The distutils will substitute the correct value at runtime, so that the above configuration file should work correctly no matter what Python version you use, now or in the future.)

Once you have done this, you can follow the normal installation instructions and use easy_install without any other special options or steps.

(Note, however, that ~/bin is not in the default PATH, so you may have to refer to scripts by their full location. You may want to modify your shell startup script (likely .bashrc or .profile) or your ~/.MacOSX/environment.plist to include ~/bin in your PATH.
0
 

Author Closing Comment

by:kmartinenko
ID: 33719814
Thanks so much pheidius!  I was attempting to use easy install, but I did not place it in its own special directory...which would probably explain why it kept returning "file not found" in the terminal.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flask is a microframework for Python based on Werkzeug and Jinja 2. This requires you to have a good understanding of Python 2.7. Lets install Flask! To install Flask you can use a python repository for libraries tool called pip. Download this f…
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now