Skip to content

BUG: undefined symbol when building Pandas with a custom python installation #63128

@Alvaro-Kothe

Description

@Alvaro-Kothe

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

import pandas

Issue Description

When building pandas from source with a custom python installation (3.13 with debug symbols) I get an error when importing pandas.

$ python -c 'import pandas'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import pandas
  File "/home/user/pandas/pandas/__init__.py", line 45, in <module>
    from pandas.core.api import (
    ...<61 lines>...
    )
  File "/home/user/pandas/pandas/core/api.py", line 46, in <module>
    from pandas.core.groupby import (
    ...<2 lines>...
    )
  File "/home/user/pandas/pandas/core/groupby/__init__.py", line 1, in <modul
e>
    from pandas.core.groupby.generic import (
    ...<3 lines>...
    )
  File "/home/user/pandas/pandas/core/groupby/generic.py", line 62, in <modul
e>
    from pandas.core.apply import (
    ...<4 lines>...
    )
  File "/home/user/pandas/pandas/core/apply.py", line 19, in <module>
    from pandas._libs.internals import BlockValuesRefs
ImportError: /home/user/pandas/build/cp313d/pandas/_libs/internals.cpython-313d-x86_64-linux-gnu.so: undefined symbol: __Pyx_PyUnstable_Object_IsUniqueReferencedTemporary

And indeed the symbol is undefined:

$ nm build/cp313d/pandas/_libs/internals.cpython-313d-x86_64-linux-gnu.so | grep Unique
                 U __Pyx_PyUnstable_Object_IsUniqueReferencedTemporary

The build using my system python3.13 doesn't even have this symbol declared:

$ nm build/cp313/pandas/_libs/internals.cpython-313-x86_64-linux-gnu.so | grep Unique
<empty>

Expected Behavior

Can import pandas normally. Hence, either define the missing symbol or to don't declare it.

Installed Versions

INSTALLED VERSIONS

commit : fa5b90a
python : 3.13.9
python-bits : 64
OS : Linux
OS-release : 6.17.7-300.fc43.x86_64
Version : #1 SMP PREEMPT_DYNAMIC Sun Nov 2 15:30:09 UTC 2025
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : pt_BR.UTF-8
LOCALE : pt_BR.UTF-8

pandas : 3.0.0.dev0+2714.gfa5b90a079
numpy : 2.3.4
dateutil : 2.9.0.post0
pip : 25.3
Cython : 3.2.1
sphinx : 8.2.3
IPython : 9.7.0
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.14.2
bottleneck : 1.6.0
fastparquet : 2024.11.0
fsspec : 2025.10.0
html5lib : 1.1
hypothesis : 6.148.0
gcsfs : 2025.10.0
jinja2 : 3.1.6
lxml.etree : 6.0.2
matplotlib : 3.10.7
numba : 0.62.1
numexpr : 2.14.1
odfpy : None
openpyxl : 3.1.5
psycopg2 : 2.9.11
pymysql : 1.4.6
pyarrow : 22.0.0
pyiceberg : 0.10.0
pyreadstat : 1.3.2
pytest : 9.0.1
python-calamine : None
pytz : 2025.2
pyxlsb : 1.0.10
s3fs : 2025.10.0
scipy : 1.16.3
sqlalchemy : 2.0.44
tables : 3.10.2
tabulate : 0.9.0
xarray : 2025.10.1
xlrd : 2.0.2
xlsxwriter : 3.2.9
zstandard : 0.25.0
qtpy : None
pyqt5 : None

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBuildLibrary building on various platforms

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions