conda-forge / scipy-feedstock

A conda-smithy repository for scipy.
BSD 3-Clause "New" or "Revised" License
6 stars 36 forks source link

PyPy + Win: TypeError: type 'cython_function_or_method' is not an acceptable base type #249

Closed maresb closed 1 year ago

maresb commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

On the PyPy + Windows build for the PyTensor feedstock, I see a TypeError which seems to originate from from scipy import linalg. The full message and context and logs are here: https://github.com/conda-forge/pytensor-suite-feedstock/pull/57#issuecomment-1711059397

Installed packages

## Package Plan ##

  environment location: D:\bld\pytensor-suite_1694148218337\_test_env

The following NEW packages will be INSTALLED:

    brotli-python:           1.1.0-py39h3665ca7_0        conda-forge
    bzip2:                   1.0.8-h8ffe710_4            conda-forge
    ca-certificates:         2023.7.22-h56e8100_0        conda-forge
    certifi:                 2023.7.22-pyhd8ed1ab_0      conda-forge
    charset-normalizer:      3.2.0-pyhd8ed1ab_0          conda-forge
    cons:                    0.4.6-pyhd8ed1ab_0          conda-forge
    etuples:                 0.3.9-pyhd8ed1ab_0          conda-forge
    expat:                   2.5.0-h63175ca_1            conda-forge
    filelock:                3.12.3-pyhd8ed1ab_0         conda-forge
    idna:                    3.4-pyhd8ed1ab_0            conda-forge
    intel-openmp:            2023.2.0-h57928b3_49496     conda-forge
    libblas:                 3.9.0-18_win64_mkl          conda-forge
    libcblas:                3.9.0-18_win64_mkl          conda-forge
    libexpat:                2.5.0-h63175ca_1            conda-forge
    libffi:                  3.4.2-h8ffe710_5            conda-forge
    libhwloc:                2.9.2-default_haede6df_1009 conda-forge
    libiconv:                1.17-h8ffe710_0             conda-forge
    liblapack:               3.9.0-18_win64_mkl          conda-forge
    libsqlite:               3.43.0-hcfcfb64_0           conda-forge
    libxml2:                 2.11.5-hc3477c8_1           conda-forge
    libzlib:                 1.2.13-hcfcfb64_5           conda-forge
    logical-unification:     0.4.6-pyhd8ed1ab_0          conda-forge
    m2w64-gcc-libgfortran:   5.3.0-6                     conda-forge
    m2w64-gcc-libs:          5.3.0-7                     conda-forge
    m2w64-gcc-libs-core:     5.3.0-7                     conda-forge
    m2w64-gmp:               6.1.0-2                     conda-forge
    m2w64-libwinpthread-git: 5.0.0.4634.697f757-2        conda-forge
    minikanren:              1.0.3-pyhd8ed1ab_0          conda-forge
    mkl:                     2022.1.0-h6a75c08_874       conda-forge
    msys2-conda-epoch:       20160418-1                  conda-forge
    multipledispatch:        0.6.0-py_0                  conda-forge
    numpy:                   1.25.2-py39h821adfb_0       conda-forge
    openssl:                 3.1.2-hcfcfb64_0            conda-forge
    packaging:               23.1-pyhd8ed1ab_0           conda-forge
    pip:                     23.2.1-pyhd8ed1ab_0         conda-forge
    platformdirs:            3.10.0-pyhd8ed1ab_0         conda-forge
    pooch:                   1.7.0-pyha770c72_3          conda-forge
    pthreads-win32:          2.9.1-hfa6e2cd_3            conda-forge
    pypy3.9:                 7.3.12-h994e1e7_4           conda-forge
    pysocks:                 1.7.1-pyh0701188_6          conda-forge
    pytensor-base:           2.16.0-py39hc3b19f1_0       local      
    python:                  3.9.17-0_73_pypy            conda-forge
    python_abi:              3.9-3_pypy39_pp73           conda-forge
    requests:                2.31.0-pyhd8ed1ab_0         conda-forge
    scipy:                   1.11.2-py39hbf2a3dc_0       conda-forge
    setuptools:              68.1.2-pyhd8ed1ab_0         conda-forge
    six:                     1.16.0-pyh6c4a22f_0         conda-forge
    sqlite:                  3.43.0-hcfcfb64_0           conda-forge
    tbb:                     2021.10.0-h91493d7_0        conda-forge
    tk:                      8.6.12-h8ffe710_0           conda-forge
    toolz:                   0.12.0-pyhd8ed1ab_0         conda-forge
    typing-extensions:       4.7.1-hd8ed1ab_0            conda-forge
    typing_extensions:       4.7.1-pyha770c72_0          conda-forge
    tzdata:                  2023c-h71feb2d_0            conda-forge
    ucrt:                    10.0.22621.0-h57928b3_0     conda-forge
    urllib3:                 2.0.4-pyhd8ed1ab_0          conda-forge
    vc:                      14.3-h64f974e_17            conda-forge
    vc14_runtime:            14.36.32532-hfdfe4a8_17     conda-forge
    vs2015_runtime:          14.36.32532-h05e6639_17     conda-forge
    wheel:                   0.41.2-pyhd8ed1ab_0         conda-forge
    win_inet_pton:           1.1.0-pyhd8ed1ab_6          conda-forge
    xz:                      5.2.6-h8d14728_0            conda-forge
    zlib:                    1.2.13-hcfcfb64_5           conda-forge

Environment info

CI for win_64_numpy1.22python3.9.____73_pypy
isuruf commented 1 year ago

cc @mattip, another issue similar to https://github.com/conda-forge/euphonic-feedstock/pull/30

h-vetinari commented 1 year ago

I've seen that error go away with cython 3, but 1.11 is not generally compatible with that yet...

maresb commented 1 year ago

Thanks for the linked issue! Note that for my case, Cython isn't installed in my environment.

h-vetinari commented 1 year ago

It's a question of whether scipy has been built with Cython 3 or 0.29.

h-vetinari commented 1 year ago

This should be fixed as of PyPy 7.3.13 which went online today. I've also triggered a rebuild of the failed job on main just to be sure (will be live in a few hours).

maresb commented 1 year ago

Confirmed that this has been fixed in https://github.com/conda-forge/pytensor-suite-feedstock/pull/67. Thanks!!!