I am importing undetected_chromedriver for a scrappy web scraping project. I keep getting this error however ModuleNotFoundError: No module named 'undetected_chromedriver'
. Everything is installed and all the versions are up to date. Why would I be getting this error?
When I run pip show undetected-chromedriver
I get
Name: undetected-chromedriver
Version: 3.5.4
Summary: ('Selenium.webdriver.Chrome replacement with compatiblity for Brave, and other Chromium based browsers.', 'Not triggered by CloudFlare/Imperva/hCaptcha and such.', 'NOTE: results may vary due to many factors. No guarantees are given, except for ongoing efforts in understanding detection algorithms.')
Home-page: https://github.com/ultrafunkamsterdam/undetected-chromedriver
Author: UltrafunkAmsterdam
Author-email: info@blackhat-security.nl
License: GPL-3.0
Location: c:\users\sekoc\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages
Requires: requests, selenium, websockets
Required-by:
when I run import sys; print(sys.path)
I get
['C:/Users/sekoc/OneDrive/Documents', 'C:\\WINDOWS\\system32', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\python39.zip', 'C:\\Panda3D-1.10.9-x64', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\DLLs', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\lib', 'C:\\Users\\sekoc\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0', 'C:\\Users\\sekoc\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\lib\\site-packages']
After searching the internet for what felt like forever the solution turned out to be pretty simple. The scrapy.cfg was in the wrong place in the file. I figured this out after reading one of the solutions on this stack discussion Scrapy throws "ModuleNotFoundError" upon execution.