BUG: Failure to build `1.3.1` on Docker image
- [x] I have checked that this issue has not already been reported.

- [x] I have confirmed this bug exists on the latest version of pandas.

- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.

---
#### Code Sample, a copy-pastable example

Docker image file 

```Dockerfile
FROM golang:1.16

RUN apt-get update \ 
    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    python3 \
    python3-pip 

COPY requirements.txt /requirements.txt

RUN python3 -m pip install -r /requirements.txt
```
Requirments file 
```
pandas == 1.3.1
``` 

Command to run 
```sh
docker build --file Dockerfile --tag test-image:latest .  
```

#### Problem description

We have been using a similar docker image(retracted the unrelated parts) with pandas version `1.3.0` so far with no problems. 

When the version changed to `1.3.1` we are getting compile errors, and since the only variable that changed is pandas version, I have to assume it's problem with that. 

Dropping the version back to `1.3.0` fixes the problem and everything works correctly.

#### Expected Output
Expected no output except the fact that install was a success

Actually got
```
---RETRACTED A LOT OF COPYING OPERATIONS---
#8 187.7     copying pandas/_libs/tslibs/src/datetime/np_datetime_strings.h -> build/lib.linux-x86_64-3.7/pandas/_libs/tslibs/src/datetime
#8 187.7     UPDATING build/lib.linux-x86_64-3.7/pandas/_version.py
#8 187.7     set build/lib.linux-x86_64-3.7/pandas/_version.py to '1.3.1'
#8 187.7     running build_ext
#8 187.7     building 'pandas._libs.algos' extension
#8 187.7     creating build/temp.linux-x86_64-3.7
#8 187.7     creating build/temp.linux-x86_64-3.7/pandas
#8 187.7     creating build/temp.linux-x86_64-3.7/pandas/_libs#8 187.7     x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -W
#8 187.7     x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/tmp/pip-build-env-ailjqcbp/lib/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -c pandas/_libs/algos.c -o build/temp.linux-x86_64-3.7/pandas/_libs/algos.o
#8 187.7     pandas/_libs/algos.c:42:10: fatal error: Python.h: No such file or directory
#8 187.7      #include "Python.h"
#8 187.7               ^~~~~~~~~~
#8 187.7     compilation terminated.
#8 187.7     error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
#8 187.7     
#8 187.7     ----------------------------------------
#8 187.9 Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-quz7o69n/pandas/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ygkh2jru/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-quz7o69n/pandas/
------
executor failed running [/bin/sh -c python3 -m pip install -r /requirements.txt]: exit code: 1
````




