Recently I have been working on quite a few projects that require different versions of packages to run. Each setup has been running in a virtual environment (that is a post for another day) and setting them up with the required package rather than the latest that easy_install can find is really simple.
easy_install "django == 1.3"
That will find and install Django version 1.3... simple as that!
Continue reading (permalink)
Posted in 'Programming'.
When setting up a new mac or fresh install of Mac OS X there is a issue that many developers may come across. The issue is with getting MySQL-python to work properly. This guide was written with 10.6.8 in mind, but it will probably work for earlier versions of the OS as well as (hopefully) 10.7 a.k.a.Lion.
EDIT: This will get you up and working, but for some reason it needs you to type the following into terminal before you start each time:
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
After you have typed this it will work until you next quit/restart. I will update this when I have figured out the best way of adding this into your paths so that you don't have to do it each time. If you know then feel free to comment below. Thanks.
The way to get this to work is a good clean install. You can google for how to remove older versions of MySQL , and I wouldn't remove Python since some OS utilities apparently use it. We will also need to get Xcode so that some of the files can be compiled.
Download Xcode (It's about 4Gb so find sonething else to do for a bit): http://developer.apple.com/tools/Xcode/
Download MySQL(Latest 64bit): http://dev.mysql.com/downloads/mysql/
Download Python (2.7.2 64bit): http://www.python.org/getit/
Install both. Install the MySQL pref pane too and start the MySQL service/server.
Open up terminal and type:
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
Keep terminal open after doing this until we are done. Use the same window for the following. /usr/local/mysql/lib/ is where MySQL is where the MySQL installer puts MySQL. The command is ...
Continue reading (permalink)
Posted in 'Web development'.