Was working on basic YOLO and getting this error

(yolo_venv) C:\Users\Lenovo\Desktop\Internship\YOLO>labelImg
Traceback (most recent call last):

  File "`<frozen runpy>`", line 198, in _run_module_as_main
  File "`<frozen runpy>`", line 88, in _run_code
  File "C:\Users\Lenovo\Desktop\Internship\YOLO\yolo_venv\Scripts\labelImg.exe\__main__.py", line 4, in <module>
  File "C:\Users\Lenovo\Desktop\Internship\YOLO\yolo_venv\Lib\site-packages\labelImg\labelImg.py", line 5, in <module>
    import distutils.spawn
ModuleNotFoundError: No module named 'distutils'

Hi,

this implies that you don’t have the distutils module installed.

  1. Open a Command Prompt window by typing cmd in the windows search.
  2. Type the following:
    pip install distutils

This should install the required module.

1 Like

distutils was removed from stdlib in 3.12. Read 3.12 what’s new for how to get it.

1 Like

Which version of Python are you running? That’s important for many questions so please include that in every question you have. :smiley:

Go to https://pypi.org and search for distutils to see if there are instructions on how to get it. Or maybe another module replaced it. In which case you will have to find out which module replaced it.

1 Like

It was showing no such module is availaible .So, in the end I downloaded a lower version of python and it worked.

Thank you I downloaded a lower version It is working now

Keep in mind that popular third-party modules require Python 3.8+ so use that to guide your decision on which Python you use.

Also MS Azure (currently) only supports up to Python 3.11 so I have to develop using that.

1 Like