Personal tools
You are here: Home About Download

Download

How to download and install Grok for the first time

Get started with Grok!

Grok is easy to get started with, only a few common dependencies need to be fulfilled before you install Grok. These dependencies are Python 2.7 or Python 2.6 (Python 2.5 will work too), a C compiler, and Easy Install. Once you've met those requirements, you will install a program called grokproject which will automatically download and install Grok and create a bare bones layout for a brand new Grok project.

Python

Python is a dynamic object-oriented programming language. It's clear, readable syntax combined with a robust, mature implementation means that it's suitable for a wide variety of problems. The Grok developers believe it makes an ideal web development language, combining both programmer productivity and long term maintainability.

Python logo

C Compiler

Grok is built on top of the Zope Toolkit. For performance reasons, portions of the source code are written in C. On platforms such as Linux or Mac OS X, you don't have to worry about this as the installer will compile and build these bits for you during installation. You will need a working C compiler installed on your system. On Windows, binary packages will be automatically installed for you (if you use Python 2.6) so there is no need for a C compiler.

If you are using Mac OS X, you can install gcc compiler by install the Developer Tools package that is available on your Mac OS X operating system DVD. 

N O T E : XCode 3.2 which comes with Mac OS X 10.6 won't compile C-code from older Zope eggs out of the box. If you run into this problem, install XCode 3.0.

Easy Install

Easy Install is a python module that lets you automatically download, build, install, and manage Python packages. Download and run a simple Python script called ez_setup.py to install the easy_install program into your Python 2.x install. You can read more about this on the PEAK Easy Install page.

$ python2.x ez_setup.py

Some systems such as Mac OS X use the sudo command to allow you to install programs as the root user. This is required if you are using a system installed version of Python 2.6.

$ sudo python2.6 ez_setup.py

It may be that you have Easy Install already available but a version that is too old. You can upgrade it by giving it the -U option:

$ sudo easy_install -U setuptools

VirtualEnv

NOTE: As of Grok 1.2, you do not need to use virtualenv. Grok is automatically isolated from the system python environment.

Virtualenv is a python tool that allows you to create isolated python environments. It's not a requirement for installing Grok, but installing grokproject globally does add a few new packages to your system Python's site-packages. If you are installing Grok to use as a developer sandbox, these packages can interfere with existing versions of those Python packages already available on your system. You can read more about using VirtualEnv to create a clean Grok installation.

Grok Project

Grok Project let's you create new Grok-based applications. It's a scaffolding tool for generating an installer for your application and a bare bones layout of a new Grok-based Python project. You can install Grok Project with easy_install, then run it, answer a few questions about the project you'd like to create, and it will generate a new ready-to-go directory named after your project.

$ easy_install grokproject
$ grokproject mygrokprojectname

Currently running grokproject downloads the parts required to build a complete Grok installation from a number of different sources over the internet. If during installation you see a 'Connection reset by peer' error message such as:

Error: Download error for
http://wwwsearch.sourceforge.net/mechanize/src/mechanize-0.1.7b.zip: (104,
'Connection reset by peer')

Then you can either re-run grokproject, or change into the newly created project directory and repeatedly run './bin/buildout' until buildout manages to download all of the necessary packages. In the future we hope to bundle all of the individual parts of Grok together to solve these installation hiccup problems.

Learn Grok

Now that you've got Grok installed with a bare bones project, you can start learning about Grok with the Grok Tutorial. Or you can browse or search the Grok Documentation area of this web site if you are looking to find help with a specific task.