Official TensorFlow for Jetson Nano!

i flowed this but when i import tensorflow ,there is a error about numpy. and i don’t install SDK Manager frist

i don’t install SDK Manager first, so can i install tensorflow gpu on jetson nano kit?

Hi
I am looking forward to use tensorflow with gpu to get better performance than my RPi3
I have successfully booted my jetson nano from the latest image.
The unattended upgrade froze but I was able to execute it later from the command line.
I found Python 3.6.7 had been installed and I was able to start and test it from the command line.

I am now trying to install tensorflow using the commands suggested.
I have executed ‘sudo apt-get install python3-pip libhdf5-serial-dev hdf5-tools’
I have executed (by adding sudo at the front!) ‘sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.5 --user’

My problem is: when I start python3 and try to import tensorflow it says there is no module named tensorflow.
‘pip3 show tensorflow’ outputs nothing
I have tried to repeat the tensorflow installation but it says the requirements are all met!
I would appreciate advice.

When I install python3-pip,libhdf5-serial-dev and hdf5-tools on my Jetson Nano board.
python3-pip and hdf5-tools is fine, but installation of libhdf5-serial-dev has some error as follow.

yaobmc@R2D2:~$ sudo apt-get install libhdf5-serial-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     libhdf5-serial-dev : Depends: libhdf5-dev but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
yaobmc@R2D2:~$ sudo apt-get install libhdf5-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     libhdf5-dev : Depends: libjpeg-dev
    E: Unable to correct problems, you have held broken packages.
yaobmc@R2D2:~$ sudo apt-get install libjpeg-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     libjpeg-dev : Depends: libjpeg8-dev but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
yaobmc@R2D2:~$ sudo apt-get install libjpeg8-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     libjpeg8-dev : Depends: libjpeg-turbo8-dev (>= 1.1.90+svn722-1ubuntu6) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
yaobmc@R2D2:~$ sudo apt-get install libjpeg-turbo8-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     libjpeg-turbo8-dev : Depends: libjpeg-turbo8 (= 1.4.2-0ubuntu3.1) but 1.5.2-0ubuntu5.18.04.1 is to be installed
    E: Unable to correct problems, you have held broken packages.

Is ‘sudo apt-get install libjpeg-turbo8=1.4.2-0ubuntu3.1’ right? After I do like this to install libhdf5-serial-dev. I can’t install h5py.

yaobmc@R2D2:~$ sudo pip3 install h5py
WARNING: The directory '/home/yaobmc/.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.
WARNING: The directory '/home/yaobmc/.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 h5py
  Downloading https://files.pythonhosted.org/packages/43/27/a6e7dcb8ae20a4dbf3725321058923fec262b6f7835179d78ccc8d98deec/h5py-2.9.0.tar.gz (287kB)
     |████████████████████████████████| 296kB 53kB/s
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Compiling /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Plex/Scanners.py because it changed.
    Compiling /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Plex/Actions.py because it changed.
    Compiling /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Compiler/Scanning.py because it changed.
    Compiling /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Compiler/Visitor.py because it changed.
    Compiling /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Compiler/FlowControl.py because it changed.
    Compiling /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Runtime/refnanny.pyx because it changed.
    Compiling /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Compiler/FusedNode.py because it changed.
    Compiling /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Tempita/_tempita.py because it changed.
    [1/8] Cythonizing /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Compiler/FlowControl.py
    [2/8] Cythonizing /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Compiler/FusedNode.py
    [3/8] Cythonizing /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Compiler/Scanning.py
    [4/8] Cythonizing /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Compiler/Visitor.py
    [5/8] Cythonizing /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Plex/Actions.py
    [6/8] Cythonizing /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Plex/Scanners.py
    [7/8] Cythonizing /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Runtime/refnanny.pyx
    [8/8] Cythonizing /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Tempita/_tempita.py
    Unable to find pgen, not compiling formal grammar.
    warning: no files found matching 'Doc/*'
    warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Utility'
    warning: no files found matching 'pyximport/README'
    /tmp/easy_install-t3z318hd/Cython-0.29.8/Cython/Plex/Scanners.c:19:10: fatal error: Python.h: No such file or directory
     #include "Python.h"
              ^~~~~~~~~~
    compilation terminated.
    Traceback (most recent call last):
      File "/usr/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
        extra_postargs)
      File "/usr/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
        spawn(cmd, dry_run=self.dry_run)
      File "/usr/lib/python3.6/distutils/spawn.py", line 36, in spawn
        _spawn_posix(cmd, search_path, dry_run=dry_run)
      File "/usr/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
        % (cmd, exit_status))
    distutils.errors.DistutilsExecError: command 'aarch64-linux-gnu-gcc' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 172, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
        self.run_command(cmdname)
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
        self.build()
      File "/usr/lib/python3.6/distutils/command/install_lib.py", line 109, in build
        self.run_command('build_ext')
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 78, in run
        _build_ext.run(self)
      File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/usr/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
        self._build_extensions_serial()
      File "/usr/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
        self.build_extension(ext)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 199, in build_extension
        _build_ext.build_extension(self, ext)
      File "/usr/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
        depends=ext.depends)
      File "/usr/lib/python3.6/distutils/ccompiler.py", line 574, in compile
        self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
      File "/usr/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
        raise CompileError(msg)
    distutils.errors.CompileError: command 'aarch64-linux-gnu-gcc' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-t3z318hd/Cython-0.29.8/setup.py", line 285, in <module>
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
        run_setup(setup_script, args)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 253, in run_setup
        raise
      File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
        self.gen.throw(type, value, traceback)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
        self.gen.throw(type, value, traceback)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/_vendor/six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-t3z318hd/Cython-0.29.8/setup.py", line 285, in <module>
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-iag_e06x/h5py/setup.py", line 168, in <module>
        cmdclass = CMDCLASS,
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
        replace_conflicting=True,
      File "/home/yaobmc/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 782, in resolve
        replace_conflicting=replace_conflicting
      File "/home/yaobmc/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1077, in obtain
        return installer(requirement)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/dist.py", line 784, in fetch_build_egg
        return cmd.easy_install(req)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 705, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/home/yaobmc/.local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1146, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-iag_e06x/h5py/

I used the commands suggested but they couldn’t work. I have no idea to slove the issue.

Im pleased to say I overcome my problem getting python to see tensorflow.
I downloaded a fresh copy of the ubuntu image file and started again!

I then successfully installed tensorflow as per this forum.
I was able to install it this time without adding sudo to the second line.(pip3 install -----)
It successfully runs a phrase classifier model that I was previously running on my RPi, from the command line.
i.e. python3 xxx.py

To make development easier I installed Thonny and I can use it to run queries on my network but currently it locks up if I use it to retrain my network after a single epoch (though is fine from the command line)
I shall have to play with that further.

I have also successfully installed vino and got ssh to work with my laptop linux mint mate filemanager.
I can now manage the nano from my laptop using vcn and copy and paste files and text between the two using ssh.

I have tried to use tensorflow.keras.imagenet_utils but that does not seem to be part of the above release. Can you say when further releases will be available and will they be announced on this blog?

Dear all,

I had a question, i am planning to use ROS with the jetson nano and as ROS is in python 2, do you plan to release a whl of tensorflow for python2?

Moreover does the c++ API also contains the TF-TRT integration like the python one?
will it be possible to build from source tensorflow on the nano to have the c++ API install?

Thank you in advance.

Does jetson nano support tensorflow with go?

Hi Team,

Is this method still working?

I am getting the following error:

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/gast/

For some reason the nvidia link is unreachable.

Regards,
Ritvik

$pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.5
Collecting tensorflow-gpu==1.13.1+nv19.5
Using cached https://developer.download.nvidia.com/compute/redist/jp/v42/tensorflow-gpu/tensorflow_gpu-1.13.1+nv19.5-cp36-cp36m-linux_aarch64.whl
Collecting gast>=0.2.0 (from tensorflow-gpu==1.13.1+nv19.5)
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 353, in run
wb.build(autobuilding=True)
File “/usr/lib/python3/dist-packages/pip/wheel.py”, line 749, in build
self.requirement_set.prepare_files(self.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/gast/

Hi jason1c087, please see this post regarding this error:

[url]https://devtalk.nvidia.com/default/topic/1055757/jetson-nano/unable-to-install-tensorflow-on-jetson-nano-because-of-quot-404-quot-on-nvidia-server-/post/5352315/#5352315[/url]

Even though I never ran pip3 before, and this was a fresh image that I downloaded and installed today,
It does seem that --no-cache-dir makes a big difference. I am still compiling, but it got past the 404 errors.

I am only running this command because
$ python3
import cv2 does not work

See https://devtalk.nvidia.com/default/topic/1055843/jetson-nano/import-cv2-fails-with-importerror-numpy-core-multiarray-failed-to-import/

EDIT: Yes, this did fix the import error in a round-about way!

Hi moderator! Please help! I have just installed OS image & done your latest instructions. But still get error:
viot@viot-desktop:~$ pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.5 --user

Collecting tensorflow-gpu==1.13.1+nv19.5
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)
11% |███▋ | 23.1MB 26kB/s eta 1:56:20Exception:
Traceback (most recent call last):
File “/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py”, line 302, in _error_catcher
yield
File “/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py”, line 384, in read
data = self._fp.read(amt)
File “/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.py”, line 60, in read
data = self.__fp.read(amt)
File “/usr/lib/python3.6/http/client.py”, line 449, in read
n = self.readinto(b)
File “/usr/lib/python3.6/http/client.py”, line 493, in readinto
n = self.fp.readinto(b)
File “/usr/lib/python3.6/socket.py”, line 586, in readinto
return self._sock.recv_into(b)
File “/usr/lib/python3.6/ssl.py”, line 1012, in recv_into
return self.read(nbytes, buffer)
File “/usr/lib/python3.6/ssl.py”, line 874, in read
return self._sslobj.read(len, buffer)
File “/usr/lib/python3.6/ssl.py”, line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

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 353, in run
wb.build(autobuilding=True)
File “/usr/lib/python3/dist-packages/pip/wheel.py”, line 749, in build
self.requirement_set.prepare_files(self.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 620, in _prepare_file
session=self.session, hashes=hashes)
File “/usr/lib/python3/dist-packages/pip/download.py”, line 821, in unpack_url
hashes=hashes
File “/usr/lib/python3/dist-packages/pip/download.py”, line 659, in unpack_http_url
hashes)
File “/usr/lib/python3/dist-packages/pip/download.py”, line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File “/usr/lib/python3/dist-packages/pip/download.py”, line 605, in _download_url
consume(downloaded_chunks)
File “/usr/lib/python3/dist-packages/pip/utils/init.py”, line 870, in consume
deque(iterator, maxlen=0)
File “/usr/lib/python3/dist-packages/pip/download.py”, line 571, in written_chunks
for chunk in chunks:
File “/usr/lib/python3/dist-packages/pip/utils/ui.py”, line 139, in iter
for x in it:
File “/usr/lib/python3/dist-packages/pip/download.py”, line 560, in resp_read
decode_content=False):
File “/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py”, line 436, in stream
data = self.read(amt=amt, decode_content=decode_content)
File “/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py”, line 401, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File “/usr/lib/python3.6/contextlib.py”, line 99, in exit
self.gen.throw(type, value, traceback)
File “/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py”, line 307, in _error_catcher
raise ReadTimeoutError(self._pool, None, ‘Read timed out.’)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘developer.download.nvidia.com’, port=443): Read timed out.

@moderator: I passed error Read Time out, but hit another error:
Collecting tensorflow-gpu
Downloading htts://developerdownloadavidia comcomputeredisvptvaz1ensorflow gpu u-1 13.1Fny19.5-c Fqp36-cp36m linux aarch64.whl (204.6MB) tensorflow
100%
Collecting astor >= 0.6.0 (from tensoriow Exception: Traceback (most recent call last): File "srlib/pyithon3/cdist packagespip bzsecomp mand.py, line 215, in main 204.6MB 2.BkB/S status selfrun(options, args) File “usr/lib/python3/dist-packages/pip/commands/nstall.py”, line 342, in run requirement set,prepare files( finder) File “usrlib/python3/dist packages/pip/'reg reg_ setpy” line 380, in prepare_files ignore dependencies self ignore dependencies) File "/usr/lib/python3/dist-packages/pip/req/reg setpy line 554, in prepare_file requirehashes File"usr/lib/python3/dist-packagespip/req/reg install py, line 278, in populate_link self link-finder.find requirement self, upgrade) File "usr/ib/python3/dist-packages/pip/index.Py line 465, in find requirement all candidates self.find all candidates(req.name) File “sr/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-packagesipip/lindex,py, line 568, in_get pages page self. get page(location) File “sr1ib/python3/dist-packages/pip/index,py” line 683, in _get page retum HMPage.get pagelink, session-sel File "usrlib/python3/dist packages/pip/index.py’, line 795, in get page resp.raise for_status0 File usrishare/python-wheelsrequests-2.18.4py2.py3-nOne-auy.whl/requests/mode sion) . line 935, in raise for status raise TTPEror Ctp. error msg, response-self) Requests.exceptons.HTTPError: 404 Client Emo: Not Found for url: https:/develope eloper.download.ndivia.com/compute/redist/jp/v42/astor/

Hi Nvidia moderator! I failed to install Tensorflow many times. PLEASE HELP!

viot@viot-desktop:~$ pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.3 --user
Collecting tensorflow-gpu==1.13.1+nv19.3
Downloading https://developer.download.nvidia.com/compute/redist/jp/v42/tensorflow-gpu/tensorflow_gpu-1.13.1+nv19.3-cp36-cp36m-linux_aarch64.whl (204.7MB)
100% |████████████████████████████████| 204.7MB 2.4kB/s
Collecting wheel>=0.26 (from tensorflow-gpu==1.13.1+nv19.3)
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 353, in run
wb.build(autobuilding=True)
File “/usr/lib/python3/dist-packages/pip/wheel.py”, line 749, in build
self.requirement_set.prepare_files(self.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/wheel/

Hi moderator, does Jetson Nano supports tensorflow version 1.14?

[url]https://jkjung-avt.github.io/build-tensorflow-1.12.2/[/url]

Hi hariharanv,

I have followed your instructions on a fresh install on the Nano:

sudo apt-get install libhdf5-serial-dev hdf5-tools
sudo apt-get install zlib1g-dev zip libjpeg8-dev libhdf5-dev

pip3 install numpy grpcio absl-py py-cpuinfo psutil portpicker grpcio six mock requests gast h5py astor termcolor

pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.3 --user

But I am getting this error at the last command, any solutions?

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/tensorflow-estimator/

Thank you.

Hi hariharanv,

I was able to resolve the issue.

change to root

sudo -s

this will upgrade to the latest version of pip3

pip3 install -U pip

exit as root

And run your last command.

Can I install docker on the nano, and just run an nvidia gpu enabled tensorflow container, rather than go through direct install? That’s what I do on my ubuntu PC that has an nvidia GPU pci card. Is there some reason the nano can’t work this way too?

This approach is especially attractive given that nvidia doesn’t include tensorflow on the sd card image, so in a few months if we upgrade via new sd card we have to reinstall tensorflow (and everything else…).