Failed build - could not build wheels for pandas

I’m using the New York bikes - Prediction code sample and get this build error:

Any advise?

      building 'pandas._libs.algos' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/pandas
      creating build/temp.linux-x86_64-cpython-311/pandas/_libs
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/tmp/pip-build-env-vjkkrsms/overlay/lib/python3.11/site-packages/numpy/core/include -I/usr/local/include/python3.11 -c pandas/_libs/algos.c -o build/temp.linux-x86_64-cpython-311/pandas/_libs/algos.o
      error: command 'gcc' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pandas
Failed to build pandas
ERROR: Could not build wheels for pandas, which is required to install pyproject.toml-based projects

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip

Step 1/2: Build failed in 0:01:45.9710924

Without knowing your exact dockerfile, I’m going to assume you previously used our base image, but now try to use another, slimmer image thanks to changes introduced in 0.5.0 version of our client.

The previous docker file had a huge suite of dependencies pre-installed, including gcc. This might no longer be true for your new image. Depending on what package manager is available in your image, you will need to add the ‘gcc’ package to your docker image.

Assuming your docker image doesn’t require sudo, so omitting that. Do the following

apt update
apt install gcc

Or the distribution specific variant of above mentioned command.

I did indeed switch to the new slimmer docker file.
I’ll add gcc and try again. Thanks.