Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

How to install scikit-learn on OSX?

Currently I have Python 2.7.5 installed in /usr/bin/python.

I would like to install sickit-learn: http://scikit-learn.org/stable/install.html#mac-osx

I've seen various instructions about using brew, pip, etc. Currently, I don't think I have brew or pip installed.

Can someone help provide some instructions?

Note: I would like to keep Python 2.7.5 in its current directory. I'm happy if Python3 is installed in /usr/bin/python3. I don't want a command like brew install python to replace Python 2.7.5; not that it will, but I'm new to it and want to be careful.

2 Answers

Jimmy Hsu
Jimmy Hsu
6,511 Points

Check out Homebrew

You can install by putting this through the terminal:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Homebrew/Brew and NPM grants you access to some of the largest libraries of tools you'll ever need.

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Letting homebrew replace the OS X Python isn't a bad thing. There have, historically, been some missing bits in OS X's Python and homebrew's Python is actually complete. It's the latest Python 2.7.x release and very solid. This will also install pip. You should then be able to install Scikit-learn through pip with no problems (assuming you have all of the dependencies installed too).