BUILD: Building wheels failing with one `requirements.txt` but passes with another
### 

- [X] I have read the [installation guide](https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#installing-pandas).


### Platform

Linux-3.10.0-1160.45.1.el7.x86_64-x86_64-with-glibc2.28; Linux-4.18.0-305.7.1.el8_4.x86_64-x86_64-with-redhat-8.4-Ootpa

### Installation Method

pip install

### pandas Version

1.3.5

### Python Version

3.9.2

### Installation Logs

I am trying to `pip install` (`-U -r requirements.txt`) `pandas` in the following set of requirements:
```
pandas
numpy
scipy
python-dateutil
wheel
scikit-learn
scikit-optimize
tqdm
networkx
joblib
twine
mlflow
requests
Cython
tables
luigi
boto3
schedule
hyperopt
statsmodels
```
It fails on `Building wheel for pandas (setup.py): started` with the following error (more details in the attached log):
```
ERROR: Command errored out with exit status 1: /home/venvs/model_env_py39/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-t9tmjsl2/scikit-learn_ec85c74cdc314b5dae36b86ff0618a56/setup.py'"'"'; __file__='"'"'/tmp/pip-install-t9tmjsl2/scikit-learn_ec85c74cdc314b5dae36b86ff0618a56/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mjw2a43x/install-record.txt --single-version-externally-managed --compile --install-headers /home/venvs/model_env_py39/include/site/python3.9/scikit-learn Check the logs for full command output.
```
[log.txt](https://github.com/pandas-dev/pandas/files/7367688/log.txt)
The interesting part is that installing the following set of requirements:
```
pandas
numpy
scipy
python-dateutil
wheel
scikit-learn
scikit-optimize
tqdm
networkx
joblib
twine
mlflow
requests
```
runs without issue. I tested this in two different Linux environments (see above) with the same result.