You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to install this with Python3.13. After many iterations to get the prerequisites installed, I finally got to this compilation failure:
Compiling src/ext/g2clib.pyx because it changed.
[1/1] Cythonizing src/ext/g2clib.pyx
building 'grib2io.g2clib' extension
creating build/temp.linux-x86_64-cpython-313/src/ext
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -O3 -fPIC -I/usr/local/include -I/tmp/pip-build-env-tv0ft7wn/overlay/lib64/python3.13/site-packages/numpy/_core/include -I/usr/include/python3.13 -c src/ext/g2clib.c -o build/temp.linux-x86_64-cpython-313/src/ext/g2clib.o
src/ext/g2clib.c: In function ‘__pyx_f_7grib2io_6g2clib__toarray’:
src/ext/g2clib.c:3224:10: error: implicit declaration of function ‘PyObject_AsWriteBuffer’; did you mean ‘PyObject_GetBuffer’? [-Wimplicit-function-declaration]
3224 | (void)(PyObject_AsWriteBuffer(__pyx_v_a, (&__pyx_v_abuf), (&__pyx_v_buflen)));
| ^~~~~~~~~~~~~~~~~~~~~~
| PyObject_GetBuffer
src/ext/g2clib.c: In function ‘__pyx_pf_7grib2io_6g2clib_10unpack7’:
src/ext/g2clib.c:5601:10: error: implicit declaration of function ‘PyObject_AsReadBuffer’; did you mean ‘PyObject_GetBuffer’? [-Wimplicit-function-declaration]
5601 | (void)(PyObject_AsReadBuffer(__pyx_v_drtmpl, (&__pyx_v_drtmpldat), (&__pyx_v_buflen)));
| ^~~~~~~~~~~~~~~~~~~~~
| PyObject_GetBuffer
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for grib2io
Failed to build grib2io
ERROR: Failed to build installable wheels for some pyproject.toml based projects (grib2io)
I'm trying to install this inside a podman container running Fedora 41, which comes with Python3.13.
I asked GrokAI about this failure, and it says:
The error message you're encountering is due to an implicit declaration of the function PyObject_AsWriteBuffer, which has been deprecated and removed in newer versions of Python. Here's how you can address this issue:
Solution:
Replace PyObject_AsWriteBuffer with Py_buffer and PyObject_GetBuffer:
The text was updated successfully, but these errors were encountered:
endlisnis
changed the title
Can't build with current Python version
Can't build with Python v3.13
Feb 8, 2025
Hi @endlisnis and @john970 - this is more of a grib2io build issue. This is a known issue. Apologies that the grib2io README says 3.8+ -- I never updated to 3.8 - 3.12.
I'm trying to install this with Python3.13. After many iterations to get the prerequisites installed, I finally got to this compilation failure:
I'm trying to install this inside a podman container running Fedora 41, which comes with Python3.13.
I asked GrokAI about this failure, and it says:
The text was updated successfully, but these errors were encountered: