Esrally installation

I am trying to install esrally on my EC2 instance and I am getting this error:

running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-cpython-37
creating build/temp.linux-x86_64-cpython-37/psutil
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=565 -DPSUTIL_LINUX=1 -I/usr/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-cpython-37/psutil/_psutil_common.o
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psutil
Failed to build psutil
ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects

I am literally running these 3 commands:

Installing Rally

  1. Ensure ~/.local/bin is in your $PATH.
  2. Ensure pip is the latest version: python3 -m pip install --user --upgrade pip
  3. Install Rally: python3 -m pip install --user esrally.

What am I doing wrong? Please help!

Hi There,

I would expect you are missing the python-dev package for your distribution.

The reason seems to be that the wheel for psutil (one of rally's dependencies) isn't available for your distribution.

The name of the python dev package varies slightly between distributions, but is most commonly called python3-dev or python3-devel

Gareth

1 Like

the former worked! thanks a ton

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.