Last weekend, I took my very first trip to SoCAL to attend Coachella; the most amazing music festival of them all.
Here is a list of musical artists I saw this year:
50 Cent, Andrew Bird, AVICII, The Black Keys, Bon Iver, BoomBoomBoomBand (RedBull Speakeasy), Calvin Harris, DJ Shadow, Dr Dre, Eminem, Florence and the Machine, Flying Lotus, Frank Ocean, Girl Talk, Godspeed, Gotye, The Hives, Justice, Kendrick Lamar, M83, Miike Snow, Radiohead, SBTRKT, Snoop Dogg, Swedish House Mafia, Tupoc hologram, Warren G, Wiz Khalifa, & a few others that I can't recall.
Pro Tips for next year:
- Get a campground for drinking, eating, and hanging out. Who wants to pay $10-14 for beer and food inside?!!
- Rent a condo b/c if you sweat like all of the other smelly campers you will want to take a shower (at least I hope you would). Also it's nice to sleep in a real bed and not a blowup bed or worse, the ground. Glad we made the choice of getting a condo this year.
- Bring your own TP (if you go the route of camping). Does this point really require detail?
- Buy some walking shoes with tons of padding. You will be walking around for 6-12 hours at a time. I made the mistake of walking around in my Vibrams sock shoes which has zero padding. Don't make that mistake or you will regret it, like I did.
Check out my Gallery: Coachella 2012 Gallery
Django on Mac OS X (10.7+) is completely easy right? I decided to put together this tutorial since sometimes it can be a pain to get things like MySQL, mysql-python, and python PIL imaging library installed properly.
1. Install Xcode which can be found on the Mac App Store.
This step might take a while so be prepared Xcode is 1GB+.
2. Install a database of your choice:
MySQL Server
MySQL can be downloaded HERE
Be prepared to click through layers of links and community registration nag. Very Lame MySQL! Also take note that MySQL will be a pain to setup and should be avoided at all cost!
First issue: MySQL's installer is so ghetto that it does not SymLink it's own executable to /usr/bin/ for commandline usage. Gee thanks MySQL installer! So here is the command to do this manually:
sudo ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
sudo ln -s /usr/local/mysql/bin/mysqladmin /usr/bin/mysqladmin
PostgresSQL Server
You can download postgres HERE (no link trickery or registration nag).
Also check out postgresapp HERE. Start, stop, and launch postgres as a standalone app.
PostgresSQL comes with an awesome installer and will even install PostGIS if needed.
Wait... that's it? Yep, it just works. Moving on..
3. Install Python libraries.
First lets start with python's imaging library but before we can install it, we'll need to download, build, and install a couple prerequisites.
JPEG Library
curl -O http://www.ijg.org/files/jpegsrc.v8c.tar.gz
tar -xvzf jpegsrc.v8c.tar.gz
cd jpeg-8c
./confgure
make
sudo make install
FreeType Library
curl -O http://ftp.igh.cnrs.fr/pub/nongnu/freetype/freetype-2.4.5.tar.gz
tar -xvzf freetype-2.4.5.tar.gz
cd freetype-2.4.5
./configure
make
sudo make install
PIP
Next lets install PIP, a Python package management tool.
sudo python easy_install pip
VirtualEnv
Lets also install VirtualEnv, a dependency manager for python related projects.
pip install pil virtualenv
Python Imaging (PIL) and Django
Note: This might also be a good time to consider using virtualenv so that project specific libraries will be isolated within the project directory and not globally installed.
MySQL-Python
Since you chose to use Postgres, you can clearly skip this part!
Before starting, we must first set an environment variable or this library will fail!
export DYLD_LIBRARY_PATH='$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/'
In some cases it my be helpful to place the mysql bin directory on your path
export PATH=/usr/local/bin:/usr/local/mysql/bin/:$PATH
Now you can install via pip install
Still having problems? Lets try to install from source HERE
Download and unpack mysql-python:
tar -xvzf MySQL-python-x.x.x.tar.gz
cd MySQL-python-x.x.x
Make sure to change the mysql_config variable under site.cfg to point to:
mysql_config=/usr/local/mysql/bin/mysql_config
If the above path does not work try a path like this:
mysql_config=/usr/local/mysql-5.6.10-osx10.7-x86/bin/mysql_config
Now lets try to install
Lastly, check that mysql-python did in fact install correctly.
python -c "import MySQLdb"
Install psycopg2
Wait... that's all I need to do for postgres? Glad you chose to switch?
Note: If experiencing any password or permission denied errors when connecting to Postgres, ensure that the lines below exist in your pg_hba.conf (obviously you would want to make this a little more secure in a production environment)
/Library/PostgreSQL/x.x/data/pg_hba.conf
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:</code>
host all all ::1/128 trust
And that is it. enjoy!