Solved

How do I install rpy2 for Python on my Mac?

Posted on 2010-09-17
2
727 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

We could spend the next millennium discussing the differences of the Mac and Windows platforms. The next century will continue to have fanatics on both side of the equation and neither side will win the war. However, that’s not why we are here. W…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
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 modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

740 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