How to install pytorch in jetson xavier

Hello everyone,

I install tensorFlow and keras in my xavier refer to

but i can’t install pytorch

if is use this code

Python 2.7

sudo apt-get install -y git build-essential libatlas-base-dev libopencv-dev graphviz python-pip
sudo pip install mxnet-1.4.0-cp27-cp27mu-linux_aarch64.whl
my xavier has this ERROR
ERROR: mxnet-1.4.0-cp27-cp27mu-linux_aarch64.whl is not a supported wheel on this platform.

I really need useing pytorch in my xavier.

Hi skagusg,

We have a PyTorch prebuilt package. The package supports Nano, TX2 and AGX Xavier.

You can also build it from the source with the steps shared in the topic.

Thanks kayccc,

I was install that site befor

I met same ERROR like this ERROR: torch-1.2.0a0+8554416-cp27-cp27mu-linux_aarch64.whl is not a supported wheel on this platform.

how can i do.

Hi skagusg, that is strange because the torch-1.2.0a0+8554416-cp27-cp27mu-linux_aarch64.whl was built on Xavier, and myself and others have been able to install it ok.

Does it make a difference if you run pip install without sudo? Is your Python interpreter or pip mapped to Python3 by chance?
Also, which JetPack version are you running? This wheel was built on JetPack 4.2.1.

To further debug the issue, can you try the PyTorch wheel for Python 3.6 (pip3). Run ‘sudo apt-get install pip3’ first.

If no luck, since you seem to have trouble installing multiple wheels, you may want to try re-installing pip or re-flashing with the latest JetPack.

Hi dusty_nv,

my xavier hasJetpack 4.2.2, i install pytorch in python3 but can’t install python how can i do?

Hi skagusg, I’m not sure why you can install Python 3.6 version but not Python 2.7 version.

You might want to try re-flashing your Xavier with JetPack and seeing if you are able to install Python 2.7 version first before doing other things.