Illegal instruction (core dumped)

While run import numpy as np or import torch in terminal under python3 shell

it shows

Illegal instruction (core dumped)

11 Likes

Hi,

Could you share your environment with us first?

For JetPack4.4.1, numpy is pre-installed when flashing the OS from the SDKmanager.
And you can get a PyTorch library for Jetson on our NGC website or the link below:

Thanks.

1 Like

Did you overcome the question? I got exactly the same problem as yours and am searching for solution now!

1 Like

Same problem here.

1 Like

I’ve got the same issue.

1 Like

I’ve got the same issue.

install from https://nvidia.box.com/shared/static/9eptse6jyly1ggt9axbja2yrmj6pbarc.whl
torch-1.6.0-cp36-cp36m-linux_aarch64.whl

I don’t know if it is related or not, but I saw in some other comment somewhere (I don’t remember where, but I think it was not on the NVIDIA forums) that this can sometimes happen when using pip or pip3 when the required is the reverse (pip3 needed instead of pip, or pip needed when pip3 is needed). No idea if that is true or not, but it is something you could test.

same problem in Xavier agx

I had the same problem after installing the same package. Numpy was replaced by another version. I fix it by renaming the installed numpy package so that its not called by default.

mv /home/user/.local/lib/python3.6/site-packages/numpy /home/visualbehavior/.local/lib/python3.6/site-user/_numpy

It is numpy 1.19.5 issue. You can fix it by installing previous minor version.
pip3 install numpy==1.19.4

35 Likes

Thanks was stuck in it for weeks!!

That worked for me! Thanks

I have a Xavier NX and I have changed to numpy 1.19.4.
I still get “illegal instruction” if I run import torch under a python3 shell

1 Like

I wonder if the 1.19.5 version of numpy is still installed on your system somewhere. You may want to run pip3 uninstall numpy && sudo pip3 uninstall numpy first.

Or you can workaround the issue with 1.19.5 by running export OPENBLAS_CORETYPE=ARMV8 before you run python3:

$ export OPENBLAS_CORETYPE=ARMV8
$ python3
>>> import numpy
>>> import torch
6 Likes

This worked for me on Xavier NX/JP 4.5.1.