Neil Thompson
Neil Thompson

Reputation: 6425

How to install Python25 on my mac with Homebrew

I'm new to Mac's and Python. I want to install an older version of Python (2.5) on to the Mac (OS X 10.8.1). I'm using homebrew as it's newer than MacPorts and I don't know enough to choose between them.

Following instructions I have installed Rails, mySQL, budle, pow - all sorts of stuff, but when I use the same technique to install python 2.5 it doesn't work.

I tried:

Axolotl:.pow neil$ brew search python25
homebrew/versions/python25

Axolotl:.pow neil$ brew install python25
Error: No available formula for python25 
Axolotl:.pow neil$ brew install homebrew/versions/python25
Error: No available formula for python25 

Where am I going wrong? Thanks.

Upvotes: 3

Views: 6625

Answers (4)

Anentropic
Anentropic

Reputation: 33923

I think the brew tap homebrew/versions tip is no longer valid...

I have added that to my Homebrew, however it appears to point to this repo: https://github.com/Homebrew/homebrew-versions

...and that does not contain any Python versions.

$ brew search python25
No formula found for "python25".

So if you want to install a specific version other than latest 2.7.x or 3.x.x you need a different method, what worked for me is:

brew install pyenv
(complete the install instructions)
pyenv install 2.5

You can then switch Python versions either globally (default) or just in current shell session, see: https://github.com/yyuu/pyenv

Upvotes: 11

Burhan Khalid
Burhan Khalid

Reputation: 174698

Instead of using brew to install into the entire system a really old version of Python; consider using pythonbrew instead. It will isolate the python install - a bit like virtual environment, but for Python itself.

Upvotes: 2

jacknagel
jacknagel

Reputation: 1311

python25 is available in the Homebrew-versions tap:

$ brew tap homebrew/versions
$ brew install python25

Upvotes: 14

Pierre GM
Pierre GM

Reputation: 20359

You're not doing anything wrong, I'm afraid you're just out of luck. Have a look on the list of formulae available: no Python2.5.

There could be a workaround: copy the python.rb gem and edit the lines mentioning a version number, switching from 2.7 to 2.5. Careful with line 31 (the sha1 signature), you'll want to edit that too.

Upvotes: 1

Related Questions