Solved

How do I install rpy2 for Python on my Mac?

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What are the best antivirus scans to run on mac book Pro 7 67
CHUMSEARCH engine takes over MAC 3 32
python error - set 2 18
phython 2 18
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
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…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

860 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