Solved

How do I install rpy2 for Python on my Mac?

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
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…

747 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

16 Experts available now in Live!

Get 1:1 Help Now