Anyhow, these are prerequisites,
- You have Python installed. Ubuntu comes with Python2.7. But, you can install Python 3.2 following another post
- Python Setuptools. If you don't have this, you can install it by
$ sudo apt-get install python-setuptools
These are steps to install Python Code Coverage
- Download the Python Code Coverage from http://pypi.python.org/pypi/coverage. As of writing, the version is 3.5
- extract the tarball to a folder, .e.g. ~/Downloads/coverage-3.5
- In Ubuntu, the default python is 2.7. It will install to /usr/local/lib/python2.7/dist-packages/
newgear@ubuntu:~/Downloads/coverage-3.5$ sudo python setup.py install -v
Or, you can do this to install to Python 3.2. It will install to /usr/local/lib/python3.2/dist-packages/
newgear@ubuntu:~/Downloads/coverage-3.5$ sudo python3.2 setup.py install -v