Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

Installation

joakimp edited this page Oct 8, 2015 · 17 revisions

Install Calvin

Download

The latest version of Calvin can be found on github.

Choose installation option

There are two major options when it comes to installing Calvin: systemwide or in a virtual environment.

If you are considering making any changes to Calvin rather than just writing applications on top of it, installing in a virtual environment as outlined in Alterative 2 below is a good idea. In fact, even if you are not planning on making changes to Calvin, it might still be a good idea, since you don't have to re-install if you pull an update from github.

Actually, to be honest, there is a third option. If you don't like the idea of virtual environments, but still want to be able to pull updates without having to re-install Calvin, skip to the very end of this page and do an "editable install".

Alternative 1: Install systemwide

To install Calvin, use the accompanying setup.py

$ python setup.py install

Alternatively, install the requirements using pip

$ pip install -r requirements.txt

Alternative 2: Install in a virtual environment

Install pip and virtualenv

Check if pip is installed:

which pip

should list it. If not, use

sudo easy_install pip

to install it.

Next, use pip to install virtualenv:

sudo pip install virtualenv

N.B. From now on, do not use sudo with you commands.

Create a virtual environment

First create a location to store your virtual environments (I chose ~/.virtualenvs/, use that or whatever suits your taste), then create a new virtual environment:

mkdir ~/.virtualenvs/
virtualenv ~/.virtualenvs/test-calvin

Activate the new test-calvin environment

source ~/.virtualenvs/test-calvin/bin/activate

and your prompt should change to indicate the activation by prepending (test-calvin) to whatever was there before. Use deactivate if you should want to leave the virtual environment. A good intro to using virtualenv can be found here

Installing Calvin

Go to a directory of your choice and clone calvin:

git clone git@github.com:EricssonResearch/calvin-base.git

(for me, this did not work. Used this instead:

git clone https://github.com/EricssonResearch/calvin-base

)

Step into cavin-base and use pip to install required packages and set up Calvin for development:

pip install -e .

A quick check with which csruntime should return ~/.virtualenvs/test-calvin/bin/csruntime. The beauty of pip install -e . is that you don't have to re-install calvin every time you change the code or pull update from github. See this link for more info on pip and pip install -e . (aka "Editable Installs").

If you want to run tests (and you know you do), you need to install the packages listed in test-requirements.txt:

pip install -r test-requirements.txt