pandas 2.2.3 import fails with RuntimeError on GraalPy 25.0.2
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
使用提供的 Dockerfile 和命令复现该失败,然后从 pandas._libs.tslibs.dtypes 开始调查;在导入期间的 traceback 中,它被标识为 dtypes.pyx。跟踪引发 dictionary-size 错误的初始化过程,并验证提供的 python -c \"import pandas\" 命令在 GraalPy 25.0.2 上成功执行后工作即完成。
由索引模型根据 Issue 内容生成。
描述
Description
On Linux with GraalPy 25.0.2, a pandas wheel built from source installs successfully but fails on import with:
RuntimeError: dictionary changed size during iteration
The reporter used:
- GraalPy 25.0.2
- Linux x86_64
- numpy 2.2.6
- pandas 2.2.3
Traceback
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/Desktop/venv/lib/python3.12/site-packages/pandas/__init__.py", line 49, in <module>
from pandas.core.api import (
File "/home/user/Desktop/venv/lib/python3.12/site-packages/pandas/core/api.py", line 1, in <module>
from pandas._libs import (
File "/home/user/Desktop/venv/lib/python3.12/site-packages/pandas/_libs/__init__.py", line 18, in <module>
from pandas._libs.interval import Interval
File "interval.pyx", line 1, in init pandas._libs.interval
File "hashtable.pyx", line 1, in init pandas._libs.hashtable
File "missing.pyx", line 1, in init pandas._libs.missing
File "/home/user/Desktop/venv/lib/python3.12/site-packages/pandas/_libs/tslibs/__init__.py", line 39, in <module>
from pandas._libs.tslibs import dtypes # pylint: disable=import-self
File "dtypes.pyx", line 172, in init pandas._libs.tslibs.dtypes
RuntimeError: dictionary changed size during iteration
Dockerfile Used To Build Wheels
FROM --platform=linux/amd64 amazonlinux:2023
USER root
ARG GRAALPY_VERSION=25.0.2
ARG ARCH=amd64
RUN dnf update -y && \
dnf install -y \
wget tar gzip unzip patchelf gcc gcc-c++ patch git \
gcc-gfortran openblas-devel zlib-devel libjpeg-turbo-devel \
libxml2-devel libxslt-devel && \
dnf clean all
RUN wget https://github.com/oracle/graalpython/releases/download/graal-${GRAALPY_VERSION}/graalpy-${GRAALPY_VERSION}-linux-${ARCH}.tar.gz && \
tar -xzf graalpy-${GRAALPY_VERSION}-linux-${ARCH}.tar.gz -C /opt/ && \
rm graalpy-${GRAALPY_VERSION}-linux-${ARCH}.tar.gz
ENV PATH="/opt/graalpy-${GRAALPY_VERSION}-linux-${ARCH}/bin:$PATH"
RUN graalpy -m ensurepip --default-pip && \
graalpy -m pip install --upgrade pip auditwheel setuptools wheel && \
graalpy -m pip install meson-python ninja cython pyproject-metadata setuptools-scm pybind11
WORKDIR /workspace
CMD ["/bin/bash", "-c", "\
graalpy -m pip wheel numpy --no-binary numpy -w /workspace && \
graalpy -m auditwheel repair /workspace/numpy-*.whl -w /workspace/wheelhouse && \
graalpy -m pip install /workspace/wheelhouse/numpy-*.whl && \
graalpy -m pip wheel pandas --no-binary pandas --find-links /workspace/wheelhouse -w /workspace && \
graalpy -m auditwheel repair /workspace/pandas-*.whl -w /workspace/wheelhouse && \
cp /workspace/wheelhouse/*.whl /out \
"]
# docker build -t libs .
# docker run --rm -v "$PWD":/out --cpus="2" --memory="15g" --memory-swap="15g" libs
Steps To Reproduce
graalpy -m venv venv
source venv/bin/activate
docker build -t libs .
docker run --rm -v "$PWD":/out --cpus="2" --memory="15g" --memory-swap="15g" libs
pip install numpy*.whl pandas*.whl
python -c "import pandas"
Expected Behavior
import pandas succeeds.
Actual Behavior
import pandas raises RuntimeError: dictionary changed size during iteration during initialization of pandas._libs.tslibs.dtypes.
- 主要语言
- Python
- 星标
- 1.7k
- 派生
- 155
- 平均合并
- 6 小时 28 分钟
- 30 天内合并 PR
- 49
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
oracle/graalpython 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
oracle/graalpython#1105 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
oracle/graalpython#1102 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 74/100
oracle/graalpython#1133 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 68/100
oracle/graalpython#1112 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 68/100
oracle/graalpython#1111 ·
维护者通常 1 天内回复
查看 oracle/graalpython 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
Juniper/ansible-junos-stdlib#904 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
pollen-robotics/reachy_mini#1457 ·
维护者通常 1 天内回复
-
area:runtime good first issue
难度 2/5 1-3 小时 新手友好度 72/100
WATonomous/wato_f1tenth#39 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
FireDynamics/fdsreader#123 ·
-
难度 1/5 1 小时以内 新手友好度 85/100