September 9, 2009 7:40 PM

Install nose with Python 2.6 on Mac OSX

The Problem

Nose, sometimes referred to as nosetests, by default when installed using setuptools (easy_install) on Mac OSX, installs itself against Python 2.5 (or possibly some other older version). This is a problem if your code is not compatible with Python 2.5. The reason for this is even after you install Python 2.6 from the python site, setuptools is still referencing the older version of python. The fix this is very easy.

Disclaimer

I am fairly sure that the method below replaces, to some degree, the version of setuptools you currently have installed. This should not cause any problems, but if it does consider this your warning.

Installing Nose Against Python 2.6

Step 1: Download and Install setuptools

Download setuptools from the Python Site the downloads are at the bottom of the page. Choose the .egg file for Python 2.6.

Once the file is downloaded, load up your trusty terminal. cd into the directory you downloaded the Python egg and run `sh setuptools-0.6c9-py2.6.egg`. Please note that the file name may change if a new version of setuptools is released, so update accordingly.

If all goes well you should have the new version of setup tools installed.

Step 2: Install Python Nose (or reinstall)

Next step is to install Nose, or reinstall if you have already installed it. Simply run, `easy_install nose` in your favorite terminal.

Commentary
There are currently no comments.
Post A Comment

Feel free to leave a comment on this site. Your email is used as a means of identification only and will not be used for any other purpose nor will it be displayed. If you do not provide one your name and website will not be saved.

Please stay on topic and use some common decency. Your first few comments will need to be approved. Eventually you will be marked trusted and your comments will not require approval.

If you wish to post code please use pastebin and post the url. If you do decided to post code it will not be formatted and any html tags will be removed.