-
Notifications
You must be signed in to change notification settings - Fork 93
Installation
The latest version of Calvin can be found on github.
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".
To install Calvin, use the accompanying setup.py
$ python setup.py install
Alternatively, install the requirements using pip
$ pip install -r requirements.txt
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.
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
Go to a directory of your choice and clone calvin using one of the following:
git clone git://github.com/EricssonResearch/calvin-base
git clone https://github.com/EricssonResearch/calvin-base
git clone http://github.com/EricssonResearch/calvin-base
At least one of them should work.
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