Homebrew investigation

After the Mavericks upgrade, I noticed that my copy of Python3 had disappeared. I don’t see the point in staying with Python 2, when Python 3 exists, so I started working with that earlier this year. I discovered that others don’t share my view. For my own material (and as a way to learn something new), I installed Python 3 onto a Mac running Lion. Like I said, Mavericks got rid of it.

After some clean up, I discovered that I needed Python 3 to run the scripts that I had written before the upgrade. I had a clean system (more or less), and I did have some minor trouble when I installed Python 3 the last time. I looked at Homebrew again and thought it could be useful. However, I did not want to get caught by surprises again on my machine. Enter the department laptop.

There’s almost no development software installed on that machine. As it happens, when I ran the instructions on the homebrew web page, I was reminded that I had a non-dev machine. I had to install the Xcode command line tools. (In this case, I think that means GCC.) Any after a successful brew install, I used it to install Python 2 on the laptop.

Like I mentioned, Python 2 is already on the laptop. Brew installs everything into /usr/local and does not wipe out software that already exists, which is helpful. However, the python version was still the old one (2.7.5) and it was still pointing to the original location (/usr/bin/python). “> brew doctor” reminded me that my $PATH had expected locations in the wrong order. It helpfully gave me the one-liner to update my ~/.bash_profile, which I ran. Once it was done and I opened a new terminal window, I had the latest version of Python (2.7.8) and the correct path (/usr/local/bin/python). Upgrading setuptools and pip through pip worked as expected.

I feel confident enough to run brew on the main machine … another day.


Leave a Reply

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s