A distro agnostic guide to Graphite with venv (examples: RHEL8, Debian10, Ubuntu18)

Fixed my PATH and PID errors in the systemd config, changed a few warnings about carbon.conf, and tested this guide on Ubuntu 20.04.

@blakehartshorn

(graphite) $ pip install --upgrade pip wheel setuptools gunicorn whisper
(graphite) $ pip install carbon --install-option="--prefix=/opt/graphite" --install-option="--install-lib=/opt/graphite/lib"
(graphite) $ pip install graphite-web --install-option="--prefix=/opt/graphite" --install-option="--install-lib=/opt/graphite/webapp"

When installing on a new Ubuntu 20.04 vm these commands throw errors:
not sure what the problem with the first one is, as it seems to do what it is supposed to.

(graphite) carbon@icinga:~$ pip install --upgrade pip wheel setuptools gunicorn whisper
Collecting pip
  Downloading pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 3.2 MB/s
Collecting wheel
  Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting setuptools
  Downloading setuptools-51.1.1-py3-none-any.whl (2.0 MB)
     |████████████████████████████████| 2.0 MB 6.7 MB/s
Collecting gunicorn
  Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
     |████████████████████████████████| 77 kB 5.4 MB/s
Collecting whisper
  Downloading whisper-1.1.7.tar.gz (37 kB)
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Building wheels for collected packages: whisper
  Building wheel for whisper (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/graphite/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-spt3z2lp/whisper/setup.py'"'"'; __file__='"'"'/tmp/pip-install-spt3z2lp/whisper/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-fw6z792c
       cwd: /tmp/pip-install-spt3z2lp/whisper/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for whisper
  Running setup.py clean for whisper
Failed to build whisper
Installing collected packages: pip, wheel, setuptools, gunicorn, six, whisper
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
  Attempting uninstall: setuptools
    Found existing installation: setuptools 44.0.0
    Uninstalling setuptools-44.0.0:
      Successfully uninstalled setuptools-44.0.0
    Running setup.py install for whisper ... done
Successfully installed gunicorn-20.0.4 pip-20.3.3 setuptools-51.1.1 six-1.15.0 wheel-0.36.2 whisper-1.1.7
(graphite) carbon@icinga:~$ pip install carbon --install-option="--prefix=/opt/graphite" --install-option="--install-lib=/opt/graphite/lib"
/opt/graphite/lib/python3.8/site-packages/pip/_internal/commands/install.py:234: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
  cmdoptions.check_install_build_global(options)
ERROR: Location-changing options found in --install-option: ['--prefix', '--install-lib'] from command line. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.

pip has been updated in he meantime to not support these options:

As I am pretty inexperienced with python/pip I have no idea how to work around that :sweat:

As I am pretty inexperienced with python/pip I have no idea how to work around that :sweat:

Hi.

Recently I had the same problem.
For the sake of simplicity, I downgraded pip (e.g. to pip 9).


Greetings

1 Like

Thanks for the hint.
Did that and it worked. So basically one could simply leave out the “pip” from the first upgrade command and it should be ok (for now)

1 Like