(Please note that a friend of mine, @vince2 ([twitter|https://twitter.com/vince2|us|Twitter : Vincent Bernat]), convinced me to use the Linux Debian distribution. This post is also valid with Ubuntu.)
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 :
- clone the official repository : git clone https://github.com/commx/python-rrdtool.git
- run the setup script : python setup.py install
- check the modules : help ('modules')
- see that rrdtool is now available !