ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
10.13k stars 1.17k forks source link

Module Not found error: ModuleNotFoundError: No module named 'distutils' #1742

Open MajesticMinhaz opened 9 months ago

MajesticMinhaz commented 9 months ago

My code

# create the driver instance
options = ChromeOptions()
options.add_argument("--headless")
driver = Chrome(options=options, driver_executable_path=config.get('DRIVER_PATH'), use_subprocess=False)
# driver = Chrome(options=options, driver_executable_path=config.get('DRIVER_PATH'))
driver.get(config.get("www.example.com"))

Error

Traceback (most recent call last):
  File "C:\Users\MD. MINHAZ\PycharmProjects\LinkedInProfileScraper\linkedin_profile_scraper.py", line 4, in <module>
    from undetected_chromedriver import Chrome, ChromeOptions
  File "C:\Users\MD. MINHAZ\PycharmProjects\LinkedInProfileScraper\.venv\Lib\site-packages\undetected_chromedriver\__init__.py", line 44, in <module>
    from .patcher import IS_POSIX
  File "C:\Users\MD. MINHAZ\PycharmProjects\LinkedInProfileScraper\.venv\Lib\site-packages\undetected_chromedriver\patcher.py", line 4, in <module>
    from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'
L0garithmic commented 8 months ago

This can be fixed by installing setuptools

pip install --upgrade setuptools

However distutils was deprecated in Python 3.10 so this function should be updated or removed

rookiexun commented 4 months ago

This can be fixed by installing setuptools

pip install --upgrade setuptools

However distutils was deprecated in Python 3.10 so this function should be updated or removed

great ! thank you