gryffin icon indicating copy to clipboard operation
gryffin copied to clipboard

Python 3.10 breaks build via pip

Open jkitchin opened this issue 1 year ago • 0 comments

I am moderately sure that Python 3.10 breaks the install.

With This Dockerfile the install works fine:

FROM jupyter/scipy-notebook:python-3.9

RUN pip install gryffin    

But with this one, it does not build

FROM jupyter/scipy-notebook:python-3.10

RUN pip install gryffin

and gives a long set of errors that starts and ends with

#6 216.0       gcc -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/tmp/pip-build-env-epl4dpk5/overlay/lib/python3.10/site-packages/numpy/core/include -I/opt/conda/include/python3.10 -c src/gryffin/bayesian_network/kernel_evaluations.c -o build/temp.linux-x86_64-cpython-310/src/gryffin/bayesian_network/kernel_evaluations.o
#6 216.0       In file included from /tmp/pip-build-env-epl4dpk5/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
#6 216.0                        from /tmp/pip-build-env-epl4dpk5/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
#6 216.0                        from /tmp/pip-build-env-epl4dpk5/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:4,
#6 216.0                        from src/gryffin/bayesian_network/kernel_evaluations.c:610:
#6 216.0       /tmp/pip-build-env-epl4dpk5/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#6 216.0          17 | #warning "Using deprecated NumPy API, disable it with " \
#6 216.0             |  ^~~~~~~
#6 216.0       src/gryffin/bayesian_network/kernel_evaluations.c: In function ‘__Pyx_call_return_trace_func’:
#6 216.0       src/gryffin/bayesian_network/kernel_evaluations.c:1595:15: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
.
.  Bunch of similar lines
.
.
.

#6 216.0       src/gryffin/bayesian_network/kernel_evaluations.c:2820:15: warning: ‘__pyx_f_7gryffin_16bayesian_network_18kernel_evaluations__gauss’ defined but not used [-Wunused-function]
#6 216.0        2820 | static double __pyx_f_7gryffin_16bayesian_network_18kernel_evaluations__gauss(double __pyx_v_x, double __pyx_v_loc, double __pyx_v_sqrt_prec) {
#6 216.0             |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#6 216.0       error: command '/usr/bin/gcc' failed with exit code 1
#6 216.0       [end of output]
#6 216.0   
#6 216.0   note: This error originates from a subprocess, and is likely not a problem with pip.
#6 216.0   ERROR: Failed building wheel for gryffin
#6 216.0 Failed to build gryffin
#6 216.0 ERROR: Could not build wheels for gryffin, which is required to install pyproject.toml-based projects

I don't have a solution. It looks like a known issue with 3.10, e.g.https://bugs.python.org/msg393401 and https://bugs.python.org/issue43760.

jkitchin avatar Dec 05 '22 22:12 jkitchin