Mxnet installation for Jetson Nano

I am currently trying to start a project with the Jetson Nano, for which I need to install Mxnet.
I am also a newbie in library installation, so i find myself completely clueless right now.

I work with the Jetson Nano Developer Kit SD Card Image freshly flashed in a 32GB SD card.
I have tried multiple times to install Mxnet now with the prebuilt MXNet package for MXNet, in I was unable to compile and install Mxnet1.5 with tensorrt on the jetson nano,Is there someone have compile it, please help me. Thank you. but it fails before finishing the tests.

Then, I’ve realized my Jetson doesn’t seem to have correctly the paths directing to CUDA libraries after running:
sudo nvcc --version
and obtaining
sudo: nvcc: command not found

I’ve crossed some solutions like: or in

They both suggest to either update the file paths in .profile or .bashrc.

My question really is, should I modify the file “” to fix this?
If yes, how? directly in the .sh, or in the .profile/.bashrc files?
Is there more information about any other paths I need to modify?

Thanks for your time! I’m really desperate and lost. Wish you a great day!

Quick update:

The environment for CUDA is supposed to be enabled now. However, the installation still fails.
This is what the terminal shows when it kills the process:

Start testing for MXNet-TRT
–2020-10-07 13:54:42-- NET/
Resolving (… 3
Connecting to (| 33|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1827 (1.8K) [text/plain]
Saving to: ‘’

resnet18-mxnet-trt_ 100%[===================>] 1.78K --.-KB/s in 0.001s

2020-10-07 13:54:42 (2.08 MB/s) - ‘’ saved [1827/1827]

./ line 93: 25940 Killed python3 resnet18-
Finish : )

The testing process is killed, and I have no hint on the reasons.
any suggestions on what’s going on?
why does it fails?



Killed error is usually caused by the out-of-memory issue.

It seem that you already reach the last step for testing.
Guess that mxnet is installed but just run out of memory when verification.

1. Please try to import mxnet to see if the installation is well or not first.

$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mxnet

2. Run the test script again with 4G swap memory.

Check this comment to create swap memory:

Run this command to verify the resnet18 inference:

$ python3


1 Like

Thank you very much!
It worked :)

Should i make the memory swap for further proyects with mxnet, or should i work with the default?


If your memory is large enough for inference, you don’t need to create swap.
Since swap memory use storage space for saving data, the access time is expected to be slower.