Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: NumPy 1.23.2 may not yet support Python 3.11 #50945

Closed
2 of 3 tasks
carlos-rian opened this issue Jan 23, 2023 · 6 comments
Closed
2 of 3 tasks

BUG: NumPy 1.23.2 may not yet support Python 3.11 #50945

carlos-rian opened this issue Jan 23, 2023 · 6 comments
Labels
Bug Dependencies Required and optional dependencies Needs Info Clarification about behavior needed to assess issue

Comments

@carlos-rian
Copy link

Pandas version checks

  • I have checked that this issue has not already been reported.

  • 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.

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

@carlos-rian carlos-rian added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 23, 2023
@rhshadrach
Copy link
Member

rhshadrach commented Jan 24, 2023

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.

@rhshadrach rhshadrach added the Dependencies Required and optional dependencies label Jan 24, 2023
@rhshadrach rhshadrach added this to the 1.5.4 milestone Jan 24, 2023
@lithomas1
Copy link
Member

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

@rgommers
Copy link
Contributor

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.

@lithomas1 lithomas1 removed the Needs Triage Issue that has not been reviewed by a pandas team member label Jan 26, 2023
@rhshadrach rhshadrach added the Needs Info Clarification about behavior needed to assess issue label Jan 26, 2023
@rhshadrach
Copy link
Member

@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?

@lithomas1 lithomas1 removed this from the 1.5.4 milestone Jan 26, 2023
@carlos-rian
Copy link
Author

@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

@lithomas1
Copy link
Member

@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

#50511 is the issue tracking this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dependencies Required and optional dependencies Needs Info Clarification about behavior needed to assess issue
Projects
None yet
Development

No branches or pull requests

4 participants