NVIDIA-AI-IOT / nvidia-tao

Other
77 stars 11 forks source link

Can't use with python 3.10 #1

Open Goddard opened 1 year ago

Goddard commented 1 year ago

Looks like python removed something. ImportError: cannot import name 'Iterable' from 'collections'

So I was unable to use with python 3.10

ramanathan831 commented 1 year ago

Can you mention which notebook you are running The Tensorflow notebooks run on python3.6 The Pytorch notebooks run on python3.7 TAO Deploy notebook run on python3.8

Goddard commented 1 year ago

This is just running the quick start for tao setup.

https://catalog.ngc.nvidia.com/orgs/nvidia/teams/tao/resources/tao-getting-started

ramanathan831 commented 1 year ago

Not clear with what's going wrong with the info you have provided thus far. Please be more specific which model/notebook you are running and on how are you running TAO (there are 4 ways in the link you mentioned)

Goddard commented 1 year ago

Not running a notebook. I am running the quickstart bash script.

ramanathan831 commented 1 year ago

Can you key-in the command you are running?

Goddard commented 1 year ago

bash quickstart_launcher.sh

This script also has a bug where it tries to use the ngc binary, but it doesn't include the base directory which results in binary not found, but I think that is unrelated to the python package issues.

ramanathan831 commented 1 year ago

Did you follow the steps here: https://docs.nvidia.com/tao/tao-toolkit/text/tao_toolkit_quick_start_guide.html#running-via-launcher ?

The aforementioned issue is not tied to this repo

MalteEbner commented 1 year ago

I got the same error:

ubuntu@ip-123-45-67-890:/GitHub/NvidiaTAOActiveLearning$ tao yolo_v4 train     -e /workspace/tao-experiments/yolo_v4/specs/yolo_v4_minneapple.txt     -r /workspace/tao-experiments/yolo_v4/experiment_dir_unpruned     --gpus 1     -k MY_API_KEY
Traceback (most recent call last):
  File "/home/ubuntu/.pyenv/versions/3.10.6/bin/tao", line 5, in <module>
    from tlt.entrypoint.tao import main
  File "/home/ubuntu/.pyenv/versions/3.10.6/lib/python3.10/site-packages/tlt/entrypoint/tao.py", line 11, in <module>
    from tlt.components.instance_handler.builder import get_launcher
  File "/home/ubuntu/.pyenv/versions/3.10.6/lib/python3.10/site-packages/tlt/components/instance_handler/builder.py", line 12, in <module>
    from tlt.components.instance_handler.local_instance import LocalInstance
  File "/home/ubuntu/.pyenv/versions/3.10.6/lib/python3.10/site-packages/tlt/components/instance_handler/local_instance.py", line 15, in <module>
    from tabulate import tabulate
  File "/home/ubuntu/.pyenv/versions/3.10.6/lib/python3.10/site-packages/tabulate.py", line 16, in <module>
    from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/home/ubuntu/.pyenv/versions/3.10.6/lib/python3.10/collections/__init__.py)

This is caused by tao using an outdated version of the tabulate package: https://github.com/astanin/python-tabulate/issues/227