Skip to content

Installation

Andrés Fortier edited this page Apr 5, 2017 · 1 revision

Install with virtualenv

Builds are performed against Ubuntu 14.04, Python 2.7.9 and pep8 v1.7.0, using virtualenv. By following these steps you should get a version of Terminus running locally:

  • Install dependencies:
$ sudo apt-get install git wget libfreetype6-dev python-virtualenv pkg-config zlib1g-dev libssl-dev build-essential protobuf-compiler libprotobuf-dev libgeos-dev python-matplotlib python-scipy gfortran libblas-dev liblapack-dev libatlas-base-dev libjpeg-dev
  • Download and compile Python 2.7.9:
$ cd ~
$ mkdir PythonInstalls
$ cd PythonInstalls
$ wget http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
$ tar xfz Python-2.7.9.tgz
$ cd Python-2.7.9/
$ ./configure --prefix /usr/local/lib/python2.7.9 --enable-ipv6
$ make
$ make install
  • Just to be sure things went ok:
$ /usr/local/lib/python2.7.9/bin/python -V
Python 2.7.9
  • Clone the repo in your machine and cd into it:
$ cd ~
$ git clone [email protected]:ekumenlabs/terminus.git
$ cd terminus
  • Setup submodule:
git submodule update --init --recursive
  • Setup virtualenv with the proper binary:
$ virtualenv -p /usr/local/lib/python2.7.9/bin/python2.7 env
Running virtualenv with interpreter /usr/local/lib/python2.7.9/bin/python2.7
New python executable in env/bin/python2.7
Also creating executable in env/bin/python
Installing setuptools, pip...done.
  • Activate the new virtual environment (important: each time you start a new terminal session you must execute this line to load the proper environment):
$ source env/bin/activate
  • Install pep 8:
$ pip install pep8==1.7.0
Downloading/unpacking pep8==1.7.0
  Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB): 41kB downloaded
Installing collected packages: pep8
Successfully installed pep8
Cleaning up...
  • Unfortunately, we need to install a couple of dependencies by hand:
$ pip install numpy
$ pip install mock
$ pip install python-slugify
  • Finish setup project dependencies:
$ python setup.py develop

By now Terminus should be setup and ready to go. To verify tests and pep8 are passing you can do:

./run_tests.sh
./run_pep8.sh
Clone this wiki locally