1. Installation of a CubicWeb environment — CubicWeb 3.13.2

### Navigation

- index
- modules |
- next |
- previous |
- CubicWeb 3.13.2 »
- Administration »

# 1. Installation of a CubicWeb environment

Official releases are available from the CubicWeb.org forge and from PyPI. Since CubicWeb is developed using Agile software development techniques, releases happen frequently. In a version numbered X.Y.Z, X changes after a few years when the API breaks, Y changes after a few weeks when features are added and Z changes after a few days when bugs are fixed.

Depending on your needs, you will chose a different way to install CubicWeb on your system:

- Installation on Debian/Ubuntu
- Installation on Windows
- Installation in a virtualenv
- Installation with pip
- Installation with easy_install
- Installation from tarball

If you are a power-user and need the very latest features, you will

- Install from version control

Once the software is installed, move on to Set-up of a CubicWeb environment for better control and advanced features of CubicWeb.

## 1.1. Debian/Ubuntu install

CubicWeb is packaged for Debian/Ubuntu (and derived distributions). Their integrated package-management system make installation and upgrade much easier for users since dependencies (like databases) are automatically installed.

Depending on the distribution you are using, add the appropriate line to your list of sources (for example by editing `/etc/apt/sources.list`).

For Debian Squeeze (stable):

    deb http://download.logilab.org/production/ squeeze/

For Debian Sid (unstable):

    deb http://download.logilab.org/production/ sid/

For Ubuntu Lucid (Long Term Support) and newer:

    deb http://download.logilab.org/production/ lucid/

    Note that for Ubuntu Maverick and newer, you shall use the `lucid`
    repository and install the ``libgecode19`` package from `lucid
    universe <http://packages.ubuntu.com/lucid/libgecode19>`_.

The repositories are signed with the Logilab’s gnupg key. You can download and register the key to avoid warnings:

    wget -q http://download.logilab.org/logilab-dists-key.asc -O- | sudo apt-key add -

Update your list of packages and perform the installation:

    apt-get update
    apt-get install cubicweb cubicweb-dev

`cubicweb` installs the framework itself, allowing you to create new instances. `cubicweb-dev` installs the development environment allowing you to develop new cubes.

There is also a wide variety of cubes. You can access a list of available cubes using `apt-cache search cubicweb` or at the CubicWeb.org forge.

Note

cubicweb-dev will install basic sqlite support. You can easily setup cubicweb with other database using the following virtual packages :

- cubicweb-postgresql-support contains the necessary dependencies for using cubicweb with postgresql datatabase
- cubicweb-mysql-support contains the necessary dependencies for using cubicweb with mysql database.

## 1.2. Windows Install

You need to have python version >= 2.5 and < 3 installed.

If you want an automated install, your best option is probably the easy_install install. EasyInstall is a tool that helps users to install python packages along with their dependencies, searching for suitable pre-compiled binaries on the The Python Package Index.

If you want better control over the process as well as a suitable development environment or if you are having problems with easy_install, read on to Installing a development environement on Windows.

## 1.3. Virtualenv install

Since version 3.9, CubicWeb can be safely installed, used and contained inside a virtualenv. You can use either pip or easy_install to install CubicWeb inside an activated virtual environment.

## 1.4. pip install

pip is a python utility that helps downloading, building, installing, and managing python packages and their dependencies. It is fully compatible with virtualenv and installs the packages from sources published on the The Python Package Index.

A working compilation chain is needed to build the modules that include C extensions. If you definitively wont, installing Lxml, Twisted Web and libgecode will help.

To install CubicWeb and its dependencies, just run:

    pip install cubicweb

There is also a wide variety of cubes. You can access a list of available cubes on PyPI or at the CubicWeb.org forge.

For example, installing the blog cube is achieved by:

    pip install cubicweb-blog

## 1.5. easy_install install

Note

If you are not a Windows user and you have a compilation environment, we recommend you to use the PipInstallation.

easy_install is a python utility that helps downloading, installing, and managing python packages and their dependencies.

Install CubicWeb and its dependencies, run:

    easy_install cubicweb

There is also a wide variety of cubes. You can access a list of available cubes on PyPI or at the CubicWeb.org Forge.

For example, installing the blog cube is achieved by:

    easy_install cubicweb-blog

Note

If you encounter problem with cubes installation, consider using pip install which is more stable but can not installed pre-compiled binaries.

## 1.6. Install from source

You can download the archive containing the sources from http://download.logilab.org/pub/cubicweb/.

Make sure you also have all the Installation dependencies.

Once uncompressed, you can install the framework from inside the uncompressed folder with:

    python setup.py install

Or you can run CubicWeb directly from the source directory by setting the resource mode to user. This will ease the development with the framework.

There is also a wide variety of cubes. You can access a list of availble cubes at the CubicWeb.org Forge.

## 1.7. Install from version control system

To keep-up with on-going development, clone the Mercurial repository:

    hg clone -u stable http://hg.logilab.org/cubicweb # stable branch
    hg clone http://hg.logilab.org/cubicweb # development branch

To get many of CubicWeb’s dependencies and a nice set of base cubes, run the clone_deps.py script located in cubicweb/bin/:

    python cubicweb/bin/clone_deps.py

(Windows users should replace slashes with antislashes).

This script will clone a set of mercurial repositories into the directory containing the `cubicweb` repository, and update them to the latest published version tag (if any).

Note

In every cloned repositories, a hg tags will display a list of tags in reverse chronological order. One reasonnable option is to go to a tagged version: the latest published version or example, as done by the clone_deps script):

    hg update cubicweb-version-3.12.2

Make sure you also have all the Installation dependencies.

### Navigation

- index
- modules |
- next |
- previous |
- CubicWeb 3.13.2 »
- Administration »