I am switching from Linux to OSX and when I run our build’s setup.py script, I get an error message that contains the text
This script requires setuptools version 0.6c7.
I have tried several times to install setuptools, and have verified that the setuptools egg exists in /Library/Python/2.6/site-packages. I have no idea why it is not being recognized.
It is very common to have multiple versions of Python on OS X systems. In recent releases of OS X, Apple has shipped two versions itself (in
/usr/bin). You may have installed more recent versions using installers from python.org (which generally exist in/Library/Frameworks/Python.frameworkor using a package distributor like MacPorts (which install in/opt/local/Library/Frameworks/Python.framework). Keep in mind that each version of Python requires its own copy ofsetuptools.Since the site package path you report is
/Library/Python/2.6/site-packages, it is most likely you have used the Apple-supplied Python 2.6.1 in OS X 10.6 to try to install a new version ofsetuptools. Note that Apple already suppliessetuptoolsfor its Pythons (0.6c9 for 2.6.1 in 10.6); the correspondingeasy_installcommands are in/usr/bin.If you are using another non-Apple-supplied Python, follow the instructions to install a new version of
setuptools(orDistribute) making sure you are invoking the right version of Python. Check your shell PATH andwhich pythonto make sure.If that doesn’t help, update your question with more information.
UPDATE: Based on your further comments, it seems something was amiss in your default site-packages directory. With that problem out of the way and having established that there is an Apple-supplied
setuptoolsversion 0.6c9 installed, it appears the package you are trying to install is looking for a specific, earlier version of setuptools, 0.6c7. If that is the case, you should first determine why that is and if it is necessary. Chances are that it is just an incorrect version specification in the package’ssetup.pyfile, i.e. using==rather than>=. If you can, edit the setup.py so it can use a newer version. In the unlikely event that the package really does need that specific older version ofsetuptools(which may not even work with that version of Python or OS X), you could try installing the older version, like so:But you really should avoid doing that if at all possible as that will install another older version of
easy_installin/usr/local/binand could cause problems with installing and using other packages.