# Fixing my scripting environment for Snow Leopard

So far, things are going well with Snow Leopard. No crashes, and all the programs I use regularly have been running fine. I had to do a little work to get my Python utility scripts running, and I had delete some AppleScript Scripting Additions that were throwing error messages.

Leopard used Python 2.5; Snow Leopard uses 2.6. All the nonstandard modules I installed under Leopard were been saved in /Library/Python/2.5/site-packages/, but Python 2.6, of course, looks in /Library/Python/2.6/site-packages instead. Clark of Clark’s Tech Blog had a post about this a few weeks ago. He did the responsible thing and did clean new installs of all the modules he uses. I tried something lazier: copying everything from 2.5/site-packages/ into 2.6/site-packages and then deleting all the .pyc files (The second step was done in case there was a change in the byte-compiled file format between 2.5 and 2.6. New .pyc files get generated automatically when the modules are called.) I had suggested this as a simple alternative in a comment to Clark’s post.

For the most part, my quick and dirty solution worked, but that’s because most of the modules I use are pure Python. Modules that use compiled C code, like appscript, are likely to fail if they’re “installed” this way. Better to use easy_install or download the code and do python setup.py install. You’ll need to install XCode 3.2 (comes on the Snow Leopard installer DVD) first, so the correct version of gcc is available.

The AppleScript Scripting Additions I had to get rid of were from the free Smile environment from Satimage. Although my AppleScripts were all running fine, they were also generating all kinds of error messages of the form:

Error loading /Library/ScriptingAdditions/Numerics.osax/Contents/MacOS/Numerics: