Import sklearn dumps core
See original GitHub issueI built sklearn and trying to import with Python3.7 getting core dump
Python 3.7.5 (default, Nov 9 2019, 17:49:52)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform; print(platform.platform())
Linux-4.19.46-4.19.1-amd64-9cf031ffa09555f2-x86_64-with-debian-stretch-sid
>>> import sys; print("Python", sys.version)
Python 3.7.5 (default, Nov 9 2019, 17:49:52)
[GCC 5.4.0 20160609]
>>> import numpy; print("NumPy", numpy.__version__)
NumPy 1.17.1
>>> import scipy; print("SciPy", scipy.__version__)
SciPy 1.3.1
>>> import sklearn; print("Scikit-Learn", sklearn.__version__)
Segmentation fault (core dumped)
Stack Trace
====== #0 0x00007fffed400d4e in PyTuple_New (size=<optimized out>) at Objects/tupleobject.c:133 #1 0x00007fffed40824e in PyType_Ready (type=type@entry=0x7fffed80fe80 <PyBaseObject_Type>) at Objects/typeobject.c:5196 #2 0x00007fffed4081d6 in PyType_Ready (type=0x7fffed808b80 <PyModuleDef_Type>) at Objects/typeobject.c:5178 #3 0x00007fffed3f2250 in PyModuleDef_Init (def=0x7fffed7ef600 <__pyx_moduledef>) at Objects/moduleobject.c:46 #4 0x00000000004d7345 in _PyImport_LoadDynamicModuleWithSpec (spec=spec@entry=0x7fffed8b28d0, fp=fp@entry=0x0) at ./Python/importdl.c:159 #5 0x00000000004d5195 in _imp_create_dynamic_impl (module=<optimized out>, file=<optimized out>, spec=0x7fffed8b28d0) at Python/import.c:2170 #6 _imp_create_dynamic (module=<optimized out>, args=<optimized out>, nargs=<optimized out>) at Python/clinic/import.c.h:289 #7 0x000000000043a544 in _PyMethodDef_RawFastCallDict (method=0x844460 <imp_methods+320>, self=0x7ffff7f6bcb0, args=<optimized out>, nargs=1, kwargs=<optimized out>) at Objects/call.c:530 #8 0x000000000043a5f5 in _PyCFunction_FastCallDict (func=0x7ffff7f847d0, args=<optimized out>, nargs=<optimized out>, kwargs=<optimized out>) at Objects/call.c:586 #9 0x0000000000429e26 in do_call_core (kwdict=0x7fffed8b0aa0, callargs=0x7fffed8b22d0, func=0x7ffff7f847d0) at Python/ceval.c:4641 #10 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3191 #11 0x00000000004be574 in _PyEval_EvalCodeWithName (_co=0x7ffff7f73150, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=2, kwnames=0x0, kwargs=kwargs@entry=0x7ffff650fb00, kwcount=kwcount@entry=0, kwstep=kwstep@entry=1, defs=0x0, defcount=0, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=name@entry=0x7ffff7f71300, qualname=qualname@entry=0x7ffff7f71300) at Python/ceval.c:3930 #12 0x000000000043987d in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433 #13 0x0000000000429b3c in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4616 #14 _PyEval_EvalFrameDefault (f=<optimized … … …
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
The problem is custom way my packages were being built. We use company specific build framework and it introduced linkage with -lpython3.7m from some configuration file. When linking the dynamic library is removed import works fine. Closing to the issue now.
Thanks for your time @glemaitre.
Thanks for giving us the reason 😃
On Fri, 15 Nov 2019 at 18:23, Monika notifications@github.com wrote:
– Guillaume Lemaitre Scikit-learn @ Inria Foundation https://glemaitre.github.io/