Python-package installing with pip (on a mac)

Tempted in by the iPad, i’ve just now moved the home system across to a mini-Mac (server). This morning i was moving the snake-charming across, and was surprised at how easy it was.

First up, you have python on your mac. To check the packaged version, type python into the terminal and hit enter (apple-space opens the search bar, type in terminal and hit enter and the terminal opens).

Happy with the version?

Either way, control-D to close, and exit back into the shell. I was happy, so i’ll assume you were also.

The mac comes with easy install, but i prefer pip, as it looks after dependencies also – it’s like the wonderful install.packages(‘__’) command in R.

So …

sudo easy_install pip

enter your password, and wait …

once that’s done, let’s use pip to install a few packages

pip install beautifulsoup4

pip install mechanize

easy!

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Python-package installing with pip (on a mac)

  1. Manny says:

    Glad your enjoying it.

please comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s