Unable to install PyTorch on JetsonNano

I am unable to get PyTorch installed on my Jetson Nano. I am following the Jetson Two Days to a Demo training program and am at the point that introduces transfer learning. My install of JetPack is 1 week old and everything in the Hello AI World has run perfectly (except for this: sudo apt-get install libpython3-dev which produced an error “you have held broken packages” that I was not able to resolve )
The procedures say to run:
$ cd jetson-inference/build
$ ./install-pytorch.sh
which brings up the tool and allows me to select PyTorch v1.1.0 for either Python 2 or 3. I have tried to run both options a couple of times without success.
The error for both choices is:
Checking for ‘qtbase5-dev’ deb package… not installed
Failed to install ‘qtbase5-dev’ deb package.
errors encountered during installation, exiting with code 1

I have tried installing qtbase5-dev using: apt-get install qtbase5-dev qtbase5-dev-tool and the error there is
E: Unable to correct problems, you have held broken packages

I have also tries installing PyTorch through the command line using many variations of this:
wget https://nvidia.box.com/shared/static/d5v4bngglqhdbr4g9ir4eeg6k6miwqnv.whl -O torch-1.0.0a0+bb15580-cp27-cp27mu-linux_aarch64.whl
pip install torch-1.0.0a0+bb15580-cp27-cp27mu-linux_aarch64.whl
from the following web page:
https://devtalk.nvidia.com/default/topic/1049071/jetson-nano/pytorch-for-jetson-nano-version-1-3-0-now-available/

Would love to get PyTorch working but equally valuable I am wondering where my error is?

Hi,

It looks like there is a broken package in your environment.
Could you try the following commands to see if helps?

$ sudo apt-get clean
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install qtbase5-dev

If all works, please try the installation again:

$ ./install-pytorch.sh

Thanks.

Thanks for the suggestion but the steps did not work.
The first 3 commands completed without error but the 4th command had had the same error “E: Unable to correct problems, you have held broken packages.”
As expected the ./install-pytorch.sh also has the same error as before.
Any other ideas?
Thanks!

Hi,

Is it possible to re-setup your environment with sdkmanager?

There is somehow a broken package on your environment.
We have verified that the apt install can work good on a clean environment from JetPack.

Would you mind to give it a try?
Thanks.

Not to contradict but from what I understand he is not using sdkmanager on a separate ubuntu environment on a host machine they way you would when working with TX2 for example.

I believe he is creating a boot SD directly from the download page and using etcher to prepare it.

It should boot on the nano and analyze the nano environment and reconfigure itself based on finding a keyboard and hdmi.

Maybe he has the wrong image? or a bad or too small SD card?

If I am missing something, please correct me.

Thanks in advance

Thanks AAstaLLL,
Thanks for the suggestion. It took a long time but a few days ago I just decided to reinstall everything on my Nano and things are mostly fine now. A different problem is that I am not able to install Python 2.x. I do however have Python 3.x installed fine.
Why do so many of the the Jetson tutorials still have 2.x Python support. This really makes things more cumbersome in the tutorials. Are there really users that MUST use Python 2?
Bert

Hi,

Actually, we are migrating our sample into python3.

Would you mind to share which sample you see is using python2?
I would like to feedback to our internal team to check if need an upgrade or not.

Thanks.

I was going through the ‘8 hour’ course for the Jetson Nano. The course supported Python 2 and Python 3 but it would have been much cleaner if it had just supported only Python 3. I suspect very few people are only able to run Python 2.

Hi,

Thanks for the feedback.

We still have some user developing their application with python 2.
To let them get started easier, some of our courses have both python version support.

In general, we are moving forward to use python 3 only.
This should be a temporal issue during the migration.

Thanks.