Pandas version checks
-
[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.
-
[ ] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
# use python3.11 on the Alpine Docker Image
Issue Description
Description
I get this error when trying to install Pandas using Python3.11 on the Alpine docker image.
Numpy is supported using version 1.24.1 for Python3.11.
Reproducible example:
requirements.txt
pandas==1.5.3
dockerfile
FROM python:alpine
RUN apk update
RUN apk add gcc
RUN pip install -U setuptools pip
COPY requirements.txt .
RUN pip install -r requirements.txt
Run docker command
docker build --tag=test .
Expected Behavior
See Issue Description
Installed Versions
pandas==1.5.3
Comment From: rhshadrach
Thanks for the report! I'm seeing 3.11 support for NumPy in 1.23.3:
https://github.com/numpy/numpy/blob/e47cbb69bebf36007c3ea009aee03e4bfe3b3f3d/setup.py#L115
I'm thinking we should update our setup.cfg to reflect this.
Comment From: lithomas1
oldest-supported-numpy is saying that the min supported version is 1.23.2 (see https://github.com/scipy/oldest-supported-numpy/blob/b0b3376f6838abd91a9988b936f70939d4acb775/setup.cfg#L65), so it should be fine, I think.
cc @rgommers from numpy for clarification
Comment From: rgommers
There are cp311
wheels for the 1.23.2 release: https://pypi.org/project/numpy/1.23.2/#files. The OP is building on Alpine here, and given that there are no numpy musllinux
wheels on PyPI, a build from source is triggered. What we need to see is the full build log with the actual error here. The "may not yet support 3.11" message is only a warning, and not the cause of the failed build.
Comment From: rhshadrach
@carlos-rian - as noted by @rgommers above, the warning you've highlighted isn't an error. Does the log show the error the caused the failure?
Comment From: carlos-rian
@rhshadrach I believe this error is caused when python tries to build the binary for alpine musllinux.
I tried to compile; I added the below lines in the dockefile, and it worked for me.
RUN apk update
RUN apk add \
build-base \
freetds-dev \
g++ \
gcc \
tar \
gfortran \
gnupg \
libffi-dev \
libpng-dev \
libsasl \
openblas-dev \
openssl-dev
It would be interesting to create the binaries for Alpine; it would be good because the compilations take about 30 minutes. After all, when they fail, the error could be more intuitive.
I created this in a lib that I compiled from rust to python; It's a good idea to use GitHub Actions.
https://github.com/carlos-rian/pysqlx-engine/blob/main/.github/workflows/ci.yml
Comment From: lithomas1
@rhshadrach I believe this error is caused when python tries to build the binary for alpine musllinux.
I tried to compile; I added the below lines in the dockefile, and it worked for me.
dockerfile RUN apk update RUN apk add \ build-base \ freetds-dev \ g++ \ gcc \ tar \ gfortran \ gnupg \ libffi-dev \ libpng-dev \ libsasl \ openblas-dev \ openssl-dev
It would be interesting to create the binaries for Alpine; it would be good because the compilations take about 30 minutes. After all, when they fail, the error could be more intuitive.
I created this in a lib that I compiled from rust to python; It's a good idea to use GitHub Actions.
https://github.com/carlos-rian/pysqlx-engine/blob/main/.github/workflows/ci.yml