Error when installing Tensorflow on Jetson AGX Xavier

I am getting the following error:

lars@JetsonAGX:~/nano/scripts$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu
[sudo] password for lars:
The directory ‘/home/lars/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/home/lars/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting tensorflow-gpu
Downloading https://developer.download.nvidia.com/compute/redist/jp/v42/tensorflow-gpu/tensorflow_gpu-1.13.1+nv19.5-cp36-cp36m-linux_aarch64.whl (204.6MB)
100% |████████████████████████████████| 204.6MB 3.3kB/s
Requirement already satisfied: absl-py>=0.1.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu)
Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu)
Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu)
Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu)
Requirement already satisfied: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow-gpu)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu)
Collecting tensorboard<1.14.0,>=1.13.0 (from tensorflow-gpu)
Exception:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/usr/lib/python3/dist-packages/pip/commands/install.py”, line 342, in run
requirement_set.prepare_files(finder)
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 554, in _prepare_file
require_hashes
File “/usr/lib/python3/dist-packages/pip/req/req_install.py”, line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File “/usr/lib/python3/dist-packages/pip/index.py”, line 568, in _get_pages
page = self._get_page(location)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 795, in get_page
resp.raise_for_status()
File “/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py”, line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://developer.download.nvidia.com/compute/redist/jp/v42/tensorboard/

Hi,

Please remember to upgrade pip3 first:

sudo pip3 install -U pip

You can find the detail instruction here:
https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html#prereqs

Thanks.

The update broke my pip3 command. I got:

pip3 --version

Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'

I temporarily fixed it by changing a line in ‘/usr/bin/pip3’:

from pip import main

TO

from pip._internal import main

See also discussion here : https://github.com/pypa/pip/issues/5240#issuecomment-381689731

Hi,

You can fix the import error with the following comment. It is a known issue for pip:
[url]https://devtalk.nvidia.com/default/topic/1051564/jetson-nano/how-to-install-the-sdk-and-tensorflow-/post/5337358/#5337358[/url]

Thanks.