Registry / testing / chromedriver-autoinstaller

chromedriver-autoinstaller

JSON →
library0.6.4pypypi✓ verified 86d ago

chromedriver-autoinstaller is a Python library that automatically downloads and installs the appropriate Chromedriver executable for the currently installed version of Google Chrome on your system. It supports Linux, MacOS, and Windows operating systems. The current version is 0.6.4 and the library is actively maintained, with a recent release in January 2024.

pip install chromedriver-autoinstaller
INSTALL
IMPORT
SIG · CHROMEDRIVER-AUTOI
C
chromedriver-autoinstaller
testingpythonv0.6.4
Install
1.8s avg
Import
190ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.198s · 18.6MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.8s · import 0.181s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

install
import chromedriver_autoinstaller chromedriver_autoinstaller.install()
The `install()` method directly handles the download and setup of the ChromeDriver.

This quickstart demonstrates how to use `chromedriver-autoinstaller` to ensure the correct Chromedriver is available, then initializes a Selenium WebDriver for Chrome, navigates to Google, prints the page title, and quits.

import chromedriver_autoinstaller from selenium import webdriver from selenium.webdriver.chrome.options import Options import os # Ensure chromedriver is installed and up-to-date chromedriver_autoinstaller.install() # Set up Chrome options (e.g., headless mode for automation) chrome_options = Options() # chrome_options.add_argument('--headless') # Uncomment for headless browsing # chrome_options.add_argument('--no-sandbox') # Recommended for Linux environments, especially in CI/CD # Initialize the WebDriver driver = webdriver.Chrome(options=chrome_options) # Navigate to a website driver.get("https://www.google.com") # Print the page title to verify print(f"Page title: {driver.title}") # Close the browser driver.quit()
Debug
Known issues
breakingChrome v115+ introduced a new driver restructuring (Chrome-for-Testing), which broke older versions of `chromedriver-autoinstaller`'s ability to locate and download the correct driver.
fix
Update to `chromedriver-autoinstaller` version `0.6.2` or newer. These versions implement the updated driver location logic.
affects: <0.6.2
gotchaRunning Chrome or ChromeDriver as the root user (administrator) on Linux is highly discouraged and can cause Chrome to crash, often resulting in 'DevToolsActivePort file doesn't exist' errors.
fix
Configure your environment to run Chrome as a regular user instead. If absolutely necessary (e.g., in some containerized environments), `ChromeOptions().add_argument('--no-sandbox')` can be used, but this is an unsupported and potentially risky workaround.
affects: All versions
gotchaWhen bundling applications with tools like `cx_Freeze` or PyInstaller, missing SSL-related DLLs (e.g., `libcrypto-1_1-x64.dll`, `libssl-1_1-x64.dll` on Windows) can prevent `chromedriver-autoinstaller` from downloading files, leading to SSL errors during installation.
fix
Ensure all necessary Python runtime and SSL DLLs are explicitly included in your application's build process or environment setup for bundled applications.
affects: All versions when bundled
gotchaBe careful with package naming. The correct package name for this library is `chromedriver-autoinstaller`. Other similar-sounding packages like `chromedriver-autoinstall` or `chromedriver-autoinstaller-fix` exist on PyPI and may offer different functionality, bug fixes, or maintenance levels.
fix
Always confirm the exact package name `chromedriver-autoinstaller` when installing to ensure you are using the intended library.
affects: All versions (user error)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'chromedriver-autoinstaller'
The 'chromedriver-autoinstaller' library has not been installed in your Python environment.
fix
pip install chromedriver-autoinstaller
WebDriverException: Message: 'chromedriver' executable needs to be in PATH
Selenium cannot locate the ChromeDriver executable because it's not in the system's PATH, or `chromedriver_autoinstaller.install()` was not successfully executed before initializing the WebDriver.
fix
Ensure you have `import chromedriver_autoinstaller` and `chromedriver_autoinstaller.install()` at the beginning of your script before creating a `webdriver.Chrome()` instance.
WARNING:root:Can not find chromedriver for currently installed chrome version
The `chromedriver-autoinstaller` library could not find a compatible ChromeDriver for your currently installed Google Chrome browser version, likely due to a recent browser update or an issue detecting the browser version.
fix
Ensure Google Chrome is installed and updated. Call `chromedriver_autoinstaller.install()` to force it to re-download the correct ChromeDriver. If issues persist, consider using `chromedriver_autoinstaller.install(True)` for a clean install or checking for alternative versions if your Chrome is a non-standard build.
WebDriverException: unknown error: cannot find Chrome binary
Selenium or ChromeDriver cannot find the Google Chrome browser executable itself, meaning Chrome is either not installed, not in the system's expected path, or has been moved/corrupted.
fix
Verify that Google Chrome is correctly installed on your system. If it is, ensure it's accessible from your environment's PATH. If running in a headless environment, confirm Chrome is installed there.
Upgrade
Version history
0.6.4latest on PyPI · released Jan 28, 2024
Audit
Dependencies
seleniumrequiredCommonly used with this library to automate Chrome, though not a direct dependency for the installer itself.
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
chromedriver-autoinstaller — pip install chromedriver-autoinstaller · libregistry