1

I want to build a Round Robin Database in Python for some time series data. I've looked at several Python modules (PyRRD, py-rrdtool, python-rrdtool, rrdtool), but as far as I can see, none of them offer support for Python 3.6+. Any suggestions as to how I can implement a rrd database in Python 3.6+?

I tried installing python-rrdtool with pip install python-rrdtool but the result I get is:

Collecting python-rrdtool
Using cached https://files.pythonhosted.org/packages/99/af/bf46df3104d78591f942278467a1016d056a887c808ed1127207a4e1ebaf/python-rrdtool-1.4.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pycharm-packaging/python-rrdtool/setup.py", line 61
    os.chmod(executable, 0777)
                            ^
SyntaxError: invalid token

----------------------------------------

    Command "python setup.py egg_info" failed with error code 1 in /tmp/pycharm-packaging/python-rrdtool/
You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
piet.t
  • 11,718
  • 21
  • 43
  • 52
C.Acarbay
  • 424
  • 5
  • 17
  • So what happened when you tried to update pip? – West Apr 18 '19 at 08:49
  • I hadn't before you asked, updated it now, same result when installing python-rrdtool – C.Acarbay Apr 18 '19 at 08:57
  • Use ```python -m pip``` or a virtualenv instead of system pip. Apparently this is a big issue at least on ubuntu when using the system pip instead of the userspace one or whatever see here:https://askubuntu.com/questions/726850/pip-upgrade-not-working – West Apr 18 '19 at 09:04
  • No that's still not working. I'm still getting the same error message. – C.Acarbay Apr 18 '19 at 09:37
  • Which is not working the update or the install of python-rrdtool? – West Apr 18 '19 at 09:41
  • install python-rrdtool. I've upgraded pip without an issue. – C.Acarbay Apr 18 '19 at 09:44
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/192035/discussion-between-west-and-c-acarbay). – West Apr 18 '19 at 09:52
  • Solved it with the help of @West. Turns out I need to read the docs better and install dependencies. Also python -m pip install works and pip install alone doesn't for some reason. – C.Acarbay Apr 18 '19 at 10:15

2 Answers2

1

Well, perhaps installing the RRDTool package first may fix the issue, on Ubuntusomething like:

sudo apt-get install librrd-dev libpython-dev

Worked for me.

Good luck!

user3116936
  • 492
  • 3
  • 21
0

python-rrdtool Python bindings for RRDtool with a native C extension.

Supported Python versions: 2.6+, 3.3+.

The bindings are based on the code of the original Python 2 bindings for rrdtool by Hye-Shik Chang, which are currently shipped as official bindings with rrdtool.

Note: python-rrdtool is now the official rrdtool Python binding and shipped with the upstream distribution.

West
  • 722
  • 7
  • 16