Installing Initial Requirements¶
On Linux we’ll be creating a clean virtualenv, so in addtion we’ll need developer tools (to compile PIL, lxml etc).
Debian and derivatives like Ubuntu and Mint, Including c9.io¶
sudo apt-get update sudo apt-get install build-essential git python python-dev python-setuptools python-virtualenv python-pip sudo apt-get install libjpeg-dev libfreetype6 libfreetype6-dev sudo apt-get build-dep python-imaging sudo apt-get build-dep python-lxml
sudo yum groupinstall "Development Tools" "Development Libraries" sudo yum install git python python-devel python-setuptools python-virtualenv python-pip libjpeg-turbo-devel libpng-devel libxml2-devel libxslt-devel
Creating and Activating the virtualenv¶
Navigate in a terminal to the directory you want the
environment created in (usually under your home directory). We’ll name the
Once in that directory:
In case you have both Python 2 and 3 installed, please make sure the virtualenv is created with Python 2. If that’s not the case, pass the correct python executable to the virtualenv command. e.g:
virtualenv -p python2 oknesset
To check which is the default interpreter virtualenv will use, run
virtualenv -h and check in the output the default for -p flag.
We need to activate the virtual environment (it mainly modifies the paths so that correct packages and bin directories will be found) each time we wish to work on the code.
In Linux we’ll source the activation script (to set env vars):
cd oknesset/ . bin/activate
Note the changed prompt which includes the virtualenv’s name.
Getting the Source Code (a.k.a Cloning)¶
Now we’ll clone the forked repository into the virutalenv. Make sure you’re in the oknesset directory and run:
git clone https://github.com/your-username/Open-Knesset.git
Replace your-username with the username you’ve registered at GitHub.
You can also clone with ssh keys, in that case follow the github guide on ssh keys. Once you’ve done that, your clone command will look like:
For c9.io you will have to use ssh keys - you will need to add c9.io ssh key to your GitHub Profile’s trusted keys.
If you have forked Open-Knesset in the past, make sure you have the latest version before proceeding to installation, by invoking:
git remote add hasadna https://github.com/hasadna/Open-Knesset.git git pull hasadna master git push origin master