Successfully installed tensorflow-2.2.0+nv20.8 but error ModuleNotFoundError: No module named 'tensorflow' occurs

Hi,
I installed tensorflow-2.2.0+nv20.8 without any error. But when i try to import in python it an error occours.

Any idea what is going wrong?

Best regards
chris

(env4gta) nvidia@nvidia-desktop:~$ sudo pip3 install --extra-index-url Index of /compute/redist/jp/v44 tensorflow==2.2.0+nv20.8
WARNING: The directory β€˜/home/nvidia/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Looking in indexes: Simple index, Index of /compute/redist/jp/v44
Collecting tensorflow==2.2.0+nv20.8
Downloading https://developer.download.nvidia.com/compute/redist/jp/v44/tensorflow/tensorflow-2.2.0%2Bnv20.8-cp36-cp36m-linux_aarch64.whl (290.1 MB)
|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 290.1 MB 6.6 MB/s
Collecting gast==0.3.3
Downloading gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Requirement already satisfied: numpy<2.0,>=1.16.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (1.16.1)
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (2.10.0)
Collecting tensorflow-estimator<2.3.0,>=2.2.0
Downloading tensorflow_estimator-2.2.0-py2.py3-none-any.whl (454 kB)
|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 454 kB 3.3 MB/s
Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (1.12.1)
Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (3.3.0)
Requirement already satisfied: six>=1.12.0 in ./.local/lib/python3.6/site-packages (from tensorflow==2.2.0+nv20.8) (1.15.0)
Requirement already satisfied: wheel>=0.26; python_version >= β€œ3” in /usr/lib/python3/dist-packages (from tensorflow==2.2.0+nv20.8) (0.30.0)
Requirement already satisfied: google-pasta>=0.1.8 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (0.2.0)
Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (1.33.2)
Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (0.11.0)
Collecting scipy==1.4.1; python_version >= β€œ3”
Downloading scipy-1.4.1.tar.gz (24.6 MB)
|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 24.6 MB 6.3 MB/s
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing wheel metadata … done
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (1.1.0)
Collecting tensorboard<2.3.0,>=2.2.0
Downloading tensorboard-2.2.2-py3-none-any.whl (3.0 MB)
|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3.0 MB 9.4 MB/s
Requirement already satisfied: protobuf>=3.8.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (3.13.0)
Requirement already satisfied: keras-preprocessing>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (1.1.1)
Requirement already satisfied: astunparse==1.6.3 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.2.0+nv20.8) (1.6.3)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (3.3.3)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (1.7.0)
Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (49.6.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in /usr/local/lib/python3.6/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (1.23.0)
Requirement already satisfied: requests<3,>=2.21.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (2.24.0)
Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.6/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (1.0.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.6/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (0.4.2)
Requirement already satisfied: importlib-metadata; python_version < β€œ3.8” in /usr/local/lib/python3.6/dist-packages (from markdown>=2.6.8->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (2.0.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.6/dist-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (0.2.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.6/dist-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (4.1.1)
Requirement already satisfied: rsa<5,>=3.1.4; python_version >= β€œ3.5” in /usr/local/lib/python3.6/dist-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (4.6)
Requirement already satisfied: idna<3,>=2.5 in /usr/lib/python3/dist-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (2.6)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./.local/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (1.25.11)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/lib/python3/dist-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (3.0.4)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (1.3.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata; python_version < β€œ3.8”->markdown>=2.6.8->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (3.4.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.6/dist-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.6/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0+nv20.8) (3.1.0)
Building wheels for collected packages: scipy
Building wheel for scipy (PEP 517) … done
Created wheel for scipy: filename=scipy-1.4.1-cp36-cp36m-linux_aarch64.whl size=43359016 sha256=d6ab23890aafbc199c46799e87e84e14c7369a8205d99b46a1b56fe2916b815e
Stored in directory: /tmp/pip-ephem-wheel-cache-g0x8_m91/wheels/a7/ec/8f/659245440bf344b931b59491d6a8022f82cf4a79c665c585c3
Successfully built scipy
Installing collected packages: gast, tensorflow-estimator, scipy, tensorboard, tensorflow
Attempting uninstall: gast
Found existing installation: gast 0.2.2
Uninstalling gast-0.2.2:
Successfully uninstalled gast-0.2.2
Attempting uninstall: tensorflow-estimator
Found existing installation: tensorflow-estimator 1.13.0
Uninstalling tensorflow-estimator-1.13.0:
Successfully uninstalled tensorflow-estimator-1.13.0
Attempting uninstall: scipy
Found existing installation: scipy 1.5.3
Uninstalling scipy-1.5.3:
Successfully uninstalled scipy-1.5.3
Attempting uninstall: tensorboard
Found existing installation: tensorboard 1.13.1
Uninstalling tensorboard-1.13.1:
Successfully uninstalled tensorboard-1.13.1
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

tensorflow-gpu 1.13.1+nv19.4 requires tensorboard<1.14.0,>=1.13.0, but you’ll have tensorboard 2.2.2 which is incompatible.
tensorflow-gpu 1.13.1+nv19.4 requires tensorflow-estimator<1.14.0rc0,>=1.13.0, but you’ll have tensorflow-estimator 2.2.0 which is incompatible.
Successfully installed gast-0.3.3 scipy-1.4.1 tensorboard-2.2.2 tensorflow-2.2.0+nv20.8 tensorflow-estimator-2.2.0
(env4gta) nvidia@nvidia-desktop:~$ python3
Python 3.6.9 (default, Oct 8 2020, 12:12:24)
[GCC 8.4.0] on linux
Type β€œhelp”, β€œcopyright”, β€œcredits” or β€œlicense” for more information.

import tensorflow
Traceback (most recent call last):
File β€œβ€, line 1, in
ModuleNotFoundError: No module named β€˜tensorflow’
exit()

Hi,

Please check below topic for the detailed suggestion:

Thanks.

1 Like

Thanks a lot. This also worked for me.

After the export I got this message

ModuleNotFoundError: No module named β€˜six’

So I did

pip3 install six

and now it works.