Skip to content

No module named 'distutils' python > 3.12 #1

@senf666

Description

@senf666

I'm using Python 3.13.7.

When I attempt to run scraper.py I get a ModuleNotFoundError: No module named 'distutils' error

Traceback (most recent call last):
  File "/Users/X/source/other/Scraping_GiveSendGo/scraper.py", line 6, in <module>
    import undetected_chromedriver as uc
  File "/Users/X/source/other/Scraping_GiveSendGo/.venv/lib/python3.13/site-packages/undetected_chromedriver/__init__.py", line 44, in <module>
    from .patcher import IS_POSIX
  File "/Users/X/source/other/Scraping_GiveSendGo/.venv/lib/python3.13/site-packages/undetected_chromedriver/patcher.py", line 4, in <module>
    from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'

The reason for this is that this module is no longer part of the Python standard library. It was removed in Python 3.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions