Illegal instruction while importing any python Packages

Description

Whenever I try to import Python Packages in Virtualenv or Archiconda3

got this error $ Illegal instruction

Error: in Virtual ENV
(an) xav@xav-desktop:~/venv$ python
Python 3.6.9 (default, Oct 8 2020, 12:12:24)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import numpy
Illegal instruction
(an) xav@xav-desktop:~/venv$

Error: in archiconda:
(base) xav@xav-desktop:~$ python
Python 3.7.2 (default, Jan 11 2019, 18:52:21)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import numpy
Illegal instruction
(base) xav@xav-desktop:~$

Working without any environment:
xav@xav-desktop:~$ python3
Python 3.6.9 (default, Oct 8 2020, 12:12:24)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import numpy

Please help to solve $ Illegal instruction error

If any assistance required please let me know

H/W: NVIDIA Xavier AGX
OS: Ubuntu:18.04

Hi @akashzade.ai,

This is not a trt issue. Please validate your installation steps for python Archiconda3

Thank you.

I solved this issue by downgrading NumPy using the below command:

$ pip3 install -Iv numpy==1.16.1

REF: https://www.javaer101.com/en/article/18546045.html

1 Like