Friday, April 04, 2008

Exploring Django - The Basic Cygwin Setup (1)

Some quick notes on how to get started with Django with cygwin on Windows. Lets start with the basic development setup with Cygwin and Sqlite3 database.

1. Setup cygwin and install the latest Python 2.5. Well Cygwin by default will install Python so just make sure your cygwin has Python 2.3 and above -- that's the minimum Python requirement for Django.

2. Download Django from

3. Install is straight forward, just tar xvfz and install. If you get confused at this stage, please consider Rails. :-)

4. Next, setup the dev environment with Django and Sqlite3. Make sure your cygwin has sqlite3 installed and Gcc. I couldn't figure out how to install python-sqlite3 as cygwin package -- there's none -- so we will have to install from the egg.

6. If you haven't install setuptools yet, go here to download and install setuptools.

7. Then run "easy_install pysqlite3". This will auto install the latest Python-sqlite3 for you. The catch is you will need gcc installed. If your cygwin doesn't have gcc, re-run your cygwin's setup.exe and select gcc.

8. After all this done -- took me about 20 minutes but this depends on your Internet speed :-D -- go watch this Video. You should be up and running Django in another 3 minutes by following that Django newbie video.

9. Go spend the next few hours trying to figure out why choose Django over Ruby on Rails and Grails. Hint: it's Python.
Another hint: It's not Ruby.
My tip: Use Grails if you can. :D

10. There is no step 10.


Bernie said...

This is a refreshing post, considering how many ruby and groovy fans out there. Why choose this over the newer scripting languages?

Seymour Cakes said...

Python, my friend is a good reason.

Cheap hosting is another.

Anonymous said...

Hey... I am having problems getting the pysqlite3 to install in a cygwin environment. It appears that the default POSIX python packages include the module sqlite3, however, python for cygwin doesn't. Do you know where I can get this package in order to use sqlite? :) much appreciated.