Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: import pandas failed in Python 3.13.2 free-threading version #60972

Open
3 tasks done
qfcy opened this issue Feb 20, 2025 · 0 comments
Open
3 tasks done

BUG: import pandas failed in Python 3.13.2 free-threading version #60972

qfcy opened this issue Feb 20, 2025 · 0 comments
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@qfcy
Copy link

qfcy commented Feb 20, 2025

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

Firstly, use python3.13t -m pip install pandas to build and install pandas on VS 16.11.43 and MSVC 19.29.30158.
Then try to import it:

E:\Git-repositories\project179>python3.13t
Python 3.13.2 experimental free-threading build (tags/v3.13.2:4f8bb39, Feb  4 2025, 15:33:40) [MSC v.1942 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
<Segmentation fault caused there>

Issue Description

The line import pandas failed in Python 3.13 free-threading version on x64 Windows.
As I tried to execute it, a segmentation fault caused because I've seen werfault.exe appeared in the task manager.

Expected Behavior

The line import pandas successfully be executed.

Installed Versions

pandas 2.2.3 (Note: cannot call pd.show_versions() as I couldn't import pandas at the first step)

Additionally, this is the output during compiling pandas that contains the MSVC version:

 + meson setup C:\Users\admin\AppData\Local\Temp\pip-install-yk54bvta\pandas_93cffcf8ab364c6d8ccc39766c5b148a C:\Users\admin\AppData\Local\Temp\pip-install-yk54bvta\pandas_93cffcf8ab364c6d8ccc39766c5b148a\.mesonpy-6btzqpgz\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\admin\AppData\Local\Temp\pip-install-yk54bvta\pandas_93cffcf8ab364c6d8ccc39766c5b148a\.mesonpy-6btzqpgz\build\meson-python-native-file.ini
      The Meson build system
      Version: 1.2.1
      Source dir: C:\Users\admin\AppData\Local\Temp\pip-install-yk54bvta\pandas_93cffcf8ab364c6d8ccc39766c5b148a
      Build dir: C:\Users\admin\AppData\Local\Temp\pip-install-yk54bvta\pandas_93cffcf8ab364c6d8ccc39766c5b148a\.mesonpy-6btzqpgz\build
      Build type: native build
      Project name: pandas
      Project version: 2.2.3
      Activating VS 16.11.43
      C compiler for the host machine: cl (msvc 19.29.30158 "用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.29.30158 版")
      C linker for the host machine: link link 14.29.30158.0
      C++ compiler for the host machine: cl (msvc 19.29.30158 "用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.29.30158 版")
      C++ linker for the host machine: link link 14.29.30158.0
      Cython compiler for the host machine: cython (cython 3.0.12)
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Program python found: YES (D:\Python\Python313\python3.13t.exe)
      Run-time dependency python found: YES 3.13
      Build targets in project: 53

      pandas 2.2.3

        User defined options
          Native files: C:\Users\admin\AppData\Local\Temp\pip-install-yk54bvta\pandas_93cffcf8ab364c6d8ccc39766c5b148a\.mesonpy-6btzqpgz\build\meson-python-native-file.ini
          buildtype   : release
          vsenv       : True
          b_ndebug    : if-release
          b_vscrt     : md

      Found ninja.EXE-1.11.1.git.kitware.jobserver-1 at C:\Users\admin\AppData\Local\Temp\pip-build-env-3jrexmoi\normal\Scripts\ninja.EXE

      Visual Studio environment is needed to run Ninja. It is recommended to use Meson wrapper:
      C:\Users\admin\AppData\Local\Temp\pip-build-env-3jrexmoi\overlay\Scripts\meson compile -C .
      + meson compile
      [1/151] Generating pandas/_libs/algos_common_helper_pxi with a custom command
      [2/151] Generating pandas/_libs/khash_primitive_helper_pxi with a custom command
      [3/151] Generating pandas/_libs/hashtable_class_helper_pxi with a custom command
      [4/151] Generating pandas/_libs/algos_take_helper_pxi with a custom command
      [5/151] Generating pandas/_libs/hashtable_func_helper_pxi with a custom command
      [6/151] Generating pandas/_libs/intervaltree_helper_pxi with a custom command
      [7/151] Generating pandas/_libs/index_class_helper_pxi with a custom command
      [8/151] Generating pandas/_libs/sparse_op_helper_pxi with a custom command
      [9/151] Generating pandas/__init__.py with a custom command
      [10/151] Compiling C object pandas/_libs/tslibs/parsing.cp313t-win_amd64.pyd.p/.._src_parser_tokenizer.c.obj
      ..\..\pandas\_libs\include\pandas/vendored/klib/khash.h(729): warning C4090: “函数”: 不同的“const”限定符
      [11/151] Compiling Cython source C:/Users/admin/AppData/Local/Temp/pip-install-yk54bvta/pandas_93cffcf8ab364c6d8ccc39766c5b148a/pandas/_libs/tslibs/base.pyx
      [12/151] Compiling C object pandas/_libs/tslibs/base.cp313t-win_amd64.pyd.p/meson-generated_pandas__libs_tslibs_base.pyx.c.obj
@qfcy qfcy added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 20, 2025
@qfcy qfcy changed the title BUG: import pandas failed in Python 3.13 free-threading version BUG: import pandas failed in Python 3.13 free-threading version Feb 20, 2025
@qfcy qfcy changed the title BUG: import pandas failed in Python 3.13 free-threading version BUG: import pandas failed in Python 3.13.2 free-threading version Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

1 participant