"kernel dies, restarting on "spyder",Illegal instruction (core dumped) on "terminal"

hello

a= torch.randn(5, 7)
print(a)

i did simple instruction in spyder, but consol refuse to respond by " Kernel died, restarting" knowing that’s without package pytorch it was working very fine… but once i did enter torch variable the kernel die… i consulted every forum in this world, no solution worked for me…

My system is ubuntu 16.04 LTS
processor intel Pentium ® CPU 6100 @2.0 2GHz
OS type: 64bits
i divided my hard disk into half windows and half ubuntu…
I downloaded pytorch from source and not from source, it stills not working, i updated each package… but it refuses to work fine…

please i want a help from you

best regards

spyder is an IDE, yes? Does pytorch still crash when you run it in a terminal window?

yes, i work with anaconda
in a terminal window when i import torch is fine but once i print a torch’s variable as above, i receive “illegal instruction (core dumped)”
as below

Could you try the steps posted here: https://stackoverflow.com/a/40223712?

thanks @SimonW for your guid… but it didn’t work…

What instruction did you find?

After "sudo sysctl -w kernel.core_uses_pid=1"
when i run my code it didn’t give me the name of the core as explained in the steps…
i dont know why…i call python to run my program but no named core displayed… can you please help how to do this step exactly “Then I run my program and got a core named core.23650” knowing that’s i have to call python in the terminal…so after my run it showed up “illegal instruction”…