pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
43.9k stars 18.03k forks source link

Unable to build from source with Python 3.14 free-threading and Cython 3.1.0a1 #60445

Open clin1234 opened 10 hours ago

clin1234 commented 10 hours ago
@clin1234 ➜ /workspaces $ venv/bin/pip install -U --pre pandas
Collecting pandas
  Using cached pandas-2.2.3.tar.gz (4.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [67 lines of output]
      + meson setup /tmp/pip-install-anpdkgs_/pandas_239c94188d0f49c383da3a300cba66e9 /tmp/pip-install-anpdkgs_/pandas_239c94188d0f49c383da3a300cba66e9/.mesonpy-9k_13c5e/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=/tmp/pip-install-anpdkgs_/pandas_239c94188d0f49c383da3a300cba66e9/.mesonpy-9k_13c5e/build/meson-python-native-file.ini
      The Meson build system
      Version: 1.2.1
      Source dir: /tmp/pip-install-anpdkgs_/pandas_239c94188d0f49c383da3a300cba66e9
      Build dir: /tmp/pip-install-anpdkgs_/pandas_239c94188d0f49c383da3a300cba66e9/.mesonpy-9k_13c5e/build
      Build type: native build
      Project name: pandas
      Project version: 2.2.3
      C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
      C linker for the host machine: cc ld.bfd 2.38
      C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
      C++ linker for the host machine: c++ ld.bfd 2.38
      Cython compiler for the host machine: cython (cython 3.0.11)
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Program python found: YES (/workspaces/venv/bin/python3.14-nogil)
      Found pkg-config: /usr/bin/pkg-config (0.29.2)
      Run-time dependency python found: YES 3.14
      Build targets in project: 53

      pandas 2.2.3

        User defined options
          Native files: /tmp/pip-install-anpdkgs_/pandas_239c94188d0f49c383da3a300cba66e9/.mesonpy-9k_13c5e/build/meson-python-native-file.ini
          buildtype   : release
          vsenv       : True
          b_ndebug    : if-release
          b_vscrt     : md

      Found ninja-1.11.1.git.kitware.jobserver-1 at /tmp/pip-build-env-a79wao_d/normal/bin/ninja

      Visual Studio environment is needed to run Ninja. It is recommended to use Meson wrapper:
      /tmp/pip-build-env-a79wao_d/overlay/bin/meson compile -C .
      + /tmp/pip-build-env-a79wao_d/normal/bin/ninja
      [1/151] Generating pandas/_libs/algos_take_helper_pxi with a custom command
      [2/151] Generating pandas/_libs/algos_common_helper_pxi with a custom command
      [3/151] Generating pandas/__init__.py with a custom command
      [4/151] Generating pandas/_libs/khash_primitive_helper_pxi with a custom command
      [5/151] Generating pandas/_libs/hashtable_class_helper_pxi with a custom command
      [6/151] Generating pandas/_libs/hashtable_func_helper_pxi with a custom command
      [7/151] Generating pandas/_libs/sparse_op_helper_pxi with a custom command
      [8/151] Generating pandas/_libs/index_class_helper_pxi with a custom command
      [9/151] Generating pandas/_libs/intervaltree_helper_pxi with a custom command
      [10/151] Compiling Cython source /tmp/pip-install-anpdkgs_/pandas_239c94188d0f49c383da3a300cba66e9/pandas/_libs/tslibs/base.pyx
      [11/151] Compiling C object pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o
      FAILED: pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o
      cc -Ipandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p -Ipandas/_libs/tslibs -I../../pandas/_libs/tslibs -I../../../../pip-build-env-a79wao_d/overlay/lib/python3.14t/site-packages/numpy/_core/include -I../../pandas/_libs/include -I/usr/include/python3.14t -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -w -std=c11 -O3 -DNPY_NO_DEPRECATED_API=0 -DNPY_TARGET_VERSION=NPY_1_21_API_VERSION -fPIC -MD -MQ pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o -MF pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o.d -o pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o -c pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/base.pyx.c
      pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/base.pyx.c:2102:80: error: unknown type name ‘__pyx_vectorcallfunc’; did you mean ‘vectorcallfunc’?
       2102 | static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
            |                                                                                ^~~~~~~~~~~~~~~~~~~~
            |                                                                                vectorcallfunc
      pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/base.pyx.c:8658:69: error: unknown type name ‘__pyx_vectorcallfunc’; did you mean ‘vectorcallfunc’?
       8658 | static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
            |                                                                     ^~~~~~~~~~~~~~~~~~~~
            |                                                                     vectorcallfunc
      pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/base.pyx.c:8703:80: error: unknown type name ‘__pyx_vectorcallfunc’; did you mean ‘vectorcallfunc’?
       8703 | static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
            |                                                                                ^~~~~~~~~~~~~~~~~~~~
            |                                                                                vectorcallfunc
      pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/base.pyx.c: In function ‘__Pyx_CyFunction_CallAsMethod’:
      pandas/_libs/tslibs/base.cpython-314t-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/base.pyx.c:9392:6: error: unknown type name ‘__pyx_vectorcallfunc’; did you mean ‘vectorcallfunc’?
       9392 |      __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
            |      ^~~~~~~~~~~~~~~~~~~~
            |      vectorcallfunc
      [12/151] Compiling Cython source /tmp/pip-install-anpdkgs_/pandas_239c94188d0f49c383da3a300cba66e9/pandas/_libs/tslibs/ccalendar.pyx
      [13/151] Compiling Cython source /tmp/pip-install-anpdkgs_/pandas_239c94188d0f49c383da3a300cba66e9/pandas/_libs/tslibs/dtypes.pyx
      ninja: build stopped: subcommand failed.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.