Graphite>0.9.15-1/any graphs on a Raspberry?

Hi everyone,

this posting is a duplicate from the forum.

In short: I’m trying to build a Raspberry Pi instance with the following software stack:

  • Icinga2
  • Grafana
  • Graphite + Carbon + Wisper

My problem is that the packages graphite and graphite-web are both version version 0.9.15-1. Both packages are delivered from the offical Raspberry/Debian 9 projekt itself and the versions are too old to work correctly with the Django 1:1.10.7-2+deb9u4 that is coming from the same repository too.

The full error message is:

root@pi:~# graphite-manage runserver
Performing system checks...

Unhandled exception in thread started by <function wrapper at 0x75ddd630>
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/utils/", line 226, in wrapper
    fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/core/management/commands/", line 121, in inner_run
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 374, in check
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 361, in _run_checks
    return checks.run_checks(**kwargs)
  File "/usr/lib/python2.7/dist-packages/django/core/checks/", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/usr/lib/python2.7/dist-packages/django/core/checks/", line 14, in check_url_config
    return check_resolver(resolver)
  File "/usr/lib/python2.7/dist-packages/django/core/checks/", line 24, in check_resolver
    for pattern in resolver.url_patterns:
  File "/usr/lib/python2.7/dist-packages/django/utils/", line 35, in __get__
    res = instance.__dict__[] = self.func(instance)
  File "/usr/lib/python2.7/dist-packages/django/urls/", line 315, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/usr/lib/python2.7/dist-packages/django/utils/", line 35, in __get__
    res = instance.__dict__[] = self.func(instance)
  File "/usr/lib/python2.7/dist-packages/django/urls/", line 308, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/", line 37, in import_module
  File "/usr/lib/python2.7/dist-packages/graphite/", line 29, in <module>
    urlpatterns = patterns('',
NameError: name 'patterns' is not defined

According to graphite-web issue #1816 the django is too new for the graphite.

My questions are:

  • How to fix this? Building a virtual-env seems a little bit to complicated to maintain.
  • Has anybody a newer package for graphite for the Pi?
  • Is there an easy way to build packages for the Pi?
  • Has anybody has a Raspberry running with any kind of graphs?


since Graphite is purely written in Python, I am using the pip way to install it in my Puppet modules and profiles (that is, inside the standalone Vagrant box for example).

I don’t think that you’ll need a virtualenv for this, just ensure that pip is installed and manage the setup with it. Also, you’ll likely need to pin the Django versions somehow, I always have seen that newer Django and Twisted versions break lots of things.

See the class instantiation here, I’ve pinned Django and Twisted there as well.

I’m not sure if there is a better method for this at the moment - provisioning the Vagrant boxes works fine since the very beginning. Probably you can learn some things from that, or find a better howto for Raspbian/Debian which includes installing Graphite via pip :slight_smile: