Bug? How to solve errors when I try to install TAO BYOM Converter TF2?

I try to install TAO BYOM Converter TF2 following this document.
However I encountered an error.

$ conda activate launcher
$ pip3 install nvidia-tao-byom
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorboard 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.
tensorflow 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.
Successfully installed altgraph-0.17.4 appdirs-1.4.4 black-19.10b0 click-8.1.7 cryptography-42.0.7 docopt-0.6.2 h5py-2.10.0 ipython-8.12.3 isort-4.3.21 joblib-1.4.2 nbconvert-7.16.4 nvidia-eff-0.5.7 nvidia-tao-byom-0.0.11.2 onnx-1.10.2 onnxconverter-common-1.14.0 onnxruntime-1.10.0 pathspec-0.12.1 pip-api-0.0.33 pipreqs-0.5.0 protobuf-3.20.2 pyarmor-8.5.8 pyarmor.cli.core-6.5.1 pybind11-2.12.0 pyinstaller-6.7.0 pyinstaller-hooks-contrib-2024.6 regex-2024.5.15 ruamel.yaml-0.18.6 ruamel.yaml.clib-0.2.8 scikit-learn-1.3.2 scipy-1.10.1 skl2onnx-1.10.4 threadpoolctl-3.5.0 toml-0.10.2 typed-ast-1.5.5 yarg-0.1.9

Then I tried,

$ pip3 install protobuf==3.19.6
$ pip3 install --force-reinstall tensorflow==2.9.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
onnxconverter-common 1.14.0 requires protobuf==3.20.2, but you have protobuf 3.19.6 which is incompatible.
$ pip3 install protobuf==3.20.2
$ pip3 install nvidia-tao-byom
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorboard 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.
tensorflow 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.

So, things is going round in circles.

What should I do for this?

Besides, when I tried to use tao_byom command, numpy error occured.

$ tao_byom --help
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'typeDict'

I solve this as

$ pip3 install numpy==1.21

Is this solution ok for TF2?

May I know which version of Ubuntu did you run?
I am going to check if I can reproduce.

@Morganh Thank you for your reply. I use Ubuntu22.04.
I tried this one, but I still encountered same errors.

$ conda create -n byom_dev python=3.8
$ conda activate byom_dev
$ pip3 install -r requirements.txt --no-deps

$ conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
pip3 install tensorflow==2.9.1

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.11.2 requires pillow!=8.3.0,>=5.3.0, which is not installed.
Successfully installed MarkupSafe-2.1.5 absl-py-2.1.0 astunparse-1.6.3 cachetools-5.3.3 certifi-2024.2.2 charset-normalizer-3.3.2 flatbuffers-1.12 gast-0.4.0 google-auth-2.29.0 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.64.0 h5py-3.11.0 idna-3.7 importlib-metadata-7.1.0 keras-2.9.0 keras-preprocessing-1.1.2 libclang-18.1.1 markdown-3.6 numpy-1.24.4 oauthlib-3.2.2 opt-einsum-3.3.0 packaging-24.0 protobuf-3.19.6 pyasn1-0.6.0 pyasn1-modules-0.4.0 requests-2.32.2 requests-oauthlib-2.0.0 rsa-4.9 six-1.16.0 tensorboard-2.9.1 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-2.9.1 tensorflow-estimator-2.9.0 tensorflow-io-gcs-filesystem-0.34.0 termcolor-2.4.0 typing-extensions-4.12.0 urllib3-2.2.1 werkzeug-3.0.3 wrapt-1.16.0 zipp-3.18.2

# Then I tried,
$ pip3 install 'pillow!=8.3.0,>=5.3.0'

$ pip3 install nvidia-tao-byom

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorboard 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.
tensorflow 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.
Successfully installed altgraph-0.17.4 appdirs-1.4.4 asttokens-2.4.1 attrs-23.2.0 backcall-0.2.0 beautifulsoup4-4.12.3 black-19.10b0 bleach-6.1.0 cffi-1.16.0 click-8.1.7 cryptography-42.0.7 decorator-5.1.1 defusedxml-0.7.1 docopt-0.6.2 executing-2.0.1 fastjsonschema-2.19.1 h5py-2.10.0 importlib-resources-6.4.0 ipython-8.12.3 isort-4.3.21 jedi-0.19.1 jinja2-3.1.4 joblib-1.4.2 jsonschema-4.22.0 jsonschema-specifications-2023.12.1 jupyter-client-8.6.2 jupyter-core-5.7.2 jupyterlab-pygments-0.3.0 matplotlib-inline-0.1.7 mistune-3.0.2 nbclient-0.10.0 nbconvert-7.16.4 nbformat-5.10.4 nvidia-eff-0.5.7 nvidia-tao-byom-0.0.11.2 onnx-1.10.2 onnxconverter-common-1.14.0 onnxruntime-1.10.0 pandocfilters-1.5.1 parso-0.8.4 pathspec-0.12.1 pexpect-4.9.0 pickleshare-0.7.5 pip-api-0.0.33 pipreqs-0.5.0 pkgutil-resolve-name-1.3.10 platformdirs-4.2.2 prompt-toolkit-3.0.43 protobuf-3.20.2 ptyprocess-0.7.0 pure-eval-0.2.2 pyarmor-8.5.8 pyarmor.cli.core-6.5.1 pybind11-2.12.0 pycparser-2.22 pygments-2.18.0 pyinstaller-6.7.0 pyinstaller-hooks-contrib-2024.6 python-dateutil-2.9.0.post0 pyzmq-26.0.3 referencing-0.35.1 regex-2024.5.15 rpds-py-0.18.1 ruamel.yaml-0.18.6 ruamel.yaml.clib-0.2.8 scikit-learn-1.3.2 scipy-1.10.1 skl2onnx-1.10.4 soupsieve-2.5 stack-data-0.6.3 threadpoolctl-3.5.0 tinycss2-1.3.0 toml-0.10.2 tornado-6.4 traitlets-5.14.3 typed-ast-1.5.5 wcwidth-0.2.13 webencodings-0.5.1 yarg-0.1.9


$ tao_byom --help

    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'typeDict'

I tried TAO BYOM Converter TF1, too.

$ conda create -n byom_dev python=3.6
$ conda activate byom_dev
$ pip3 install nvidia-pyindex
$ pip3 install nvidia-tensorflow
$ pip3 install nvidia-tao-byom
  Attempting uninstall: numpy
    Found existing installation: numpy 1.19.5
    Uninstalling numpy-1.19.5:
      Successfully uninstalled numpy-1.19.5
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
nvidia-tensorflow 1.15.5+nv23.3 requires numpy~=1.19.0; python_version < "3.7", but you have numpy 1.18.5 which is incompatible.
nvidia-tensorflow 1.15.5+nv23.3 requires nvidia-cudnn-cu12~=8.8, but you have nvidia-cudnn-cu12 9.1.1.17 which is incompatible.
Successfully installed altgraph-0.17.4 ......

$ python -c "import numpy as np; print(np.__version__)"
1.18.5

$ pip3 install numpy==1.19.5
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.18.5
    Uninstalling numpy-1.18.5:
      Successfully uninstalled numpy-1.18.5
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
nvidia-tensorflow 1.15.5+nv23.3 requires nvidia-cudnn-cu12~=8.8, but you have nvidia-cudnn-cu12 9.1.1.17 which is incompatible.
nvidia-tao-byom 0.0.11 requires numpy<1.19.0,>=1.18.5, but you have numpy 1.19.5 which is incompatible.
Successfully installed numpy-1.19.5

Why are these errors happened installing not only TF2 but also TF1?

Hi,
I just follow GitHub - NVIDIA-AI-IOT/tao_byom_examples: Examples of converting different open-source deep learning models to TAO compatible format through TAO BYOM package. . And in the end, install numpy==1.21 instead.
The tao_byom --help works.

Attach my log.
20240527_forum_293997_byom_classification_tf2.txt (65.3 KB)

You can refer to it.

@Morganh
Thank you.
I read your .txt file.
I found some installing errors as I was encountered.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.11.2 requires pillow!=8.3.0,>=5.3.0, which is not installed.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorboard 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.
tensorflow 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.11.2 requires pillow!=8.3.0,>=5.3.0, which is not installed.
tensorboard 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.
tensorflow 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2 which is incompatible.

However you said tao_byom --help works if tao_byom --help does not pop out any error.
So, does it mean we do not need to care about any pip’s dependency errors?

You can ignore the errors if it does not affect the tao_byom.

@Morganh
Thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.