-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: Importing numpy 2.2.6
for Python 3.12.10, GCC 11.4.0 on linux throws a segmentation fault
#29075
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
Comments
What platform hardware are you using? Is this inside a VM, and if so which one? |
Can you get a traceback for the segfault from e.g. gdb? |
I have an older Dell XPS 13 9380 with a Core i7-8565U CPU running Ubuntu 22.04.5 LTS and I'm not able to reproduce the segfault using Python 3.12.10 installed via pyenv. |
GDB is telling me that ctypes is what's causing the problem. I built a fresh install of Python 3.12.10 from source and this problem is gone now. Is this issue still worth leaving open? Here are the GDB logs by the way
(venv) victory@victory-xps-15-9520:~/test$ gdb --args python -c "import numpy"
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help". Thread 1 "python" received signal SIGSEGV, Segmentation fault. |
Where did the failing CPython build come from? I see |
2.6.6
for Python 3.12.10, GCC 11.4.0 on linux throws a segmentation fault2.2.6
for Python 3.12.10, GCC 11.4.0 on linux throws a segmentation fault
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue:
pip installing numpy on Ubuntu 22.04.5 LTS and attempting to import it raises a segmentation fault.
Reproduce the code example:
Error message:
Python and NumPy Versions:
Importing numpy segfaults but the system version is
3.12.10 (main, Apr 9 2025, 08:55:05) [GCC 11.4.0]
Runtime Environment:
No response
Context for the issue:
Got caught from a downstream library that imports numpy quantumlib/Stim#957. Maybe this is related to #28991
The text was updated successfully, but these errors were encountered: