Error while installing a python code

Marco Sulla mail.python.org at marco.sulla.e4ward.com
Mon Mar 9 17:36:40 EDT 2020


I suppose you tried to use this setup.py:
https://github.com/breathe/coffee_conda_package/blob/master/0001-Add-alternative-setup.py-script.patch

It's not well written IMHO... anyway this is not the problem.

I suppose you also downloaded the required sources from here:
https://data.mendeley.com/datasets/s2x4d542dc/1

It seems the problem is that the above sources are generated by an old
version of Cython:

https://github.com/mcfletch/pyopengl/issues/11

You have "simply" to enter any subdir of PoissonSolver that ends with
"_cy", remove the .c file inside and do:
python setup.py build_ext --inplace

After that, you'll be able to compile. The result is an ELF file. On
my PC, the generated file is
PoissonSolver/PoissonSolver/ps3d.cpython-38-x86_64-linux-gnu.so

On Mon, 9 Mar 2020 at 15:27, Tim Ko <thardaway1 at gmail.com> wrote:
>
> Hello,
>
> I am trying to install a custom Python code but ran into an error. The error presumably associated with cython. I tried a different compiler since Intel compiler often crashes when using cython, but couldn't get it working.
>
> Attached is the installation error log. I have installed and updated all essential packages such as numpy and scipy. Could someone please give me advice to resolve this issue? Many thanks in advance.
>
> Sincerely,
> TK
>
>
> ===================
> $ python setup.py build_ext -b PoissonSolver/
> running build_ext
> skipping 'PoissonSolver/MV_2D_cy/matvec2D.c' Cython extension (up-to-date)
> skipping 'PoissonSolver/MV_1D_cy/matvec1D.c' Cython extension (up-to-date)
> skipping 'PoissonSolver/PS_3D_cy/ps3d.c' Cython extension (up-to-date)
> building 'matvec2D' extension
> icc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home01/r782a03/.conda/envs/hko_env/lib/python3.7/site-packages/numpy/core/include -I/home01/r782a03/.conda/envs/hko_env/include/python3.7m -c PoissonSolver/MV_2D_cy/matvec2D.c -o build/temp.linux-x86_64-3.7/PoissonSolver/MV_2D_cy/matvec2D.o -ffast-math
> icc: command line warning #10006: ignoring unknown option '-ffast-math'
> In file included from /home01/r782a03/.conda/envs/hko_env/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h(1830),
>                  from /home01/r782a03/.conda/envs/hko_env/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h(12),
>                  from /home01/r782a03/.conda/envs/hko_env/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h(4),
>                  from PoissonSolver/MV_2D_cy/matvec2D.c(232):
> /home01/r782a03/.conda/envs/hko_env/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h(17): warning #1224: #warning directive: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
>   #warning "Using deprecated NumPy API, disable it with " \
>    ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17500): error: struct "_ts" has no field "exc_type"
>       *type = tstate->exc_type;
>                       ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17501): error: struct "_ts" has no field "exc_value"
>       *value = tstate->exc_value;
>                        ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17502): error: struct "_ts" has no field "exc_traceback"
>       *tb = tstate->exc_traceback;
>                     ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17514): error: struct "_ts" has no field "exc_type"
>       tmp_type = tstate->exc_type;
>                          ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17515): error: struct "_ts" has no field "exc_value"
>       tmp_value = tstate->exc_value;
>                           ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17516): error: struct "_ts" has no field "exc_traceback"
>       tmp_tb = tstate->exc_traceback;
>                        ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17517): error: struct "_ts" has no field "exc_type"
>       tstate->exc_type = type;
>               ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17518): error: struct "_ts" has no field "exc_value"
>       tstate->exc_value = value;
>               ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17519): error: struct "_ts" has no field "exc_traceback"
>       tstate->exc_traceback = tb;
>               ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17562): error: struct "_ts" has no field "exc_type"
>       tmp_type = tstate->exc_type;
>                          ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17563): error: struct "_ts" has no field "exc_value"
>       tmp_value = tstate->exc_value;
>                           ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17564): error: struct "_ts" has no field "exc_traceback"
>       tmp_tb = tstate->exc_traceback;
>                        ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17565): error: struct "_ts" has no field "exc_type"
>       tstate->exc_type = local_type;
>               ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17566): error: struct "_ts" has no field "exc_value"
>       tstate->exc_value = local_value;
>               ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17567): error: struct "_ts" has no field "exc_traceback"
>       tstate->exc_traceback = local_tb;
>               ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17589): error: struct "_ts" has no field "exc_type"
>       tmp_type = tstate->exc_type;
>                          ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17590): error: struct "_ts" has no field "exc_value"
>       tmp_value = tstate->exc_value;
>                           ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17591): error: struct "_ts" has no field "exc_traceback"
>       tmp_tb = tstate->exc_traceback;
>                        ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17592): error: struct "_ts" has no field "exc_type"
>       tstate->exc_type = *type;
>               ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17593): error: struct "_ts" has no field "exc_value"
>       tstate->exc_value = *value;
>               ^
>
> PoissonSolver/MV_2D_cy/matvec2D.c(17594): error: struct "_ts" has no field "exc_traceback"
>       tstate->exc_traceback = *tb;
>               ^
>
> compilation aborted for PoissonSolver/MV_2D_cy/matvec2D.c (code 2)
> error: command 'icc' failed with exit status 2
> ===================
> --
> https://mail.python.org/mailman/listinfo/python-list


More information about the Python-list mailing list