python-rrdtool setup


(Please note that a friend of mine, @vince2 ([twitter||us|Twitter : Vincent Bernat]), convinced me to use the Linux Debian distribution. This post is also valid with Ubuntu.)

For a new application I'm developping, I need to store time-series data and for that I choose to rely on RRDtool and specifically need the python-rrdtool bindings.

It is possible to install the modules through pip, as explained in the package : . But this drives me to an error :-/ .

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-az_K_M/python-rrdtool/';f=getattr(tokenize, 'open', open)(__file__);'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-vjNAN5-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-az_K_M/python-rrdtool/

Therefore, I'm reading the docs and follow the installation steps listed in the official documentation.

In the documentation, I learn that the requirements are certainly the problem. I also need to install the dependencies : librrd-dev and libpython3-dev. Again, I'm getting the same error as tons of developpers (see Google, stackoverflow and others websites).

I'm constantly checking the python available modules from the python prompt with : help('modules') but I can't get rrdtool in the list !

I finally solved the problem by running the command :

apt-get install build-essential

Then, I could :

  1. clone the official repository : git clone
  2. run the setup script : python install
  3. check the modules : help ('modules')
  4. see that rrdtool is now available !

Haut de page