Ctrl C crashes python during sleep if sklear is imported
See original GitHub issueHello I’m sorry but I have to reopen this:
Here is a simple test, I launch a time.sleep and while it’s sleeping i press Ctrl C. The issue (as you can see below) happens on sklearn, not other packages (PS I can reproduce it everytime)
I also have found this issue in scipy.stats BTW. I also found this issue on it here, but I cannot apply the solution to this case because I cannot load manually the libifcoremd.dll (I don’t find it in my environment packages, only the PYD)
I have tried to reset the signal handler to the default value with signal.signal(signal.SIGINT, signal.SIG_DFL)
without any success.
problem may be related to fortran https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/518251
If someone could help me to adapt the solution mentioned to this case.
Thank you in advance
PS this was seen in #9431 before but closed
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I can reproduce on a Windows VM. Glad you found a solution to your problem.
This is not directly related to scikit-learn (you can easily find examples only using scipy) and seems to be linked with the Intel Fortran compiler installing a Ctrl-C handler on Windows. The best link I could find is https://github.com/ContinuumIO/anaconda-issues/issues/905#issuecomment-232498034 (more references in this issue).
There was a PR on scipy that was never merged: https://github.com/scipy/scipy/pull/3880. @acourdavault I think you would be more than welcome to open a PR on scipy if you have the spare bandwidth.
@acourdavault Thanks for reporting this. It would have probably been better to continue in the parent issue just FYI. Also, please make sure you had a look at the bug submission guidelines (particularly regarding using code formatting instead of screenshots and providing the version numbers with the included code snippet). Could you please post the output of the “versions” code snippet? How did you install scikit-learn?
I tried to reproduce this issue with this script using Python 3.6 and scikit-learn installed with conda on Appveyor. So far unsuccessfully (i.e. I don’t get this error), but maybe someone on Windows would be more lucky…
Could you please confirm that the above-linked script raises an exception on your system? Thanks.