(Please note that a friend of mine, @vince2_ (twitter), 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 : https://pypi.org/project/python-rrdtool/ . 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/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\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 https://github.com/commx/python-rrdtool.git
  2. run the setup script : python setup.py install
  3. check the modules : help ('modules')
  4. see that rrdtool is now available !