Install & Compatibility
Where this runs
tested against v3.7.0 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.512s · 31.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.474s · 32MB
27MB installed
● package 27MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Marionette
✓ from marionette_driver.marionette import Marionette
✗ from marionette import Marionette
The package is 'marionette_driver' (underscore), not 'marionette'
Wait
✓ from marionette_driver.wait import Wait
Commonly used for explicit waits
By
✓ from marionette_driver.by import By
Used to specify element location strategies
Connects to a running Firefox instance with Marionette enabled (--marionette flag) or a GeckoDriver server.
from marionette_driver.marionette import Marionette
client = Marionette(host='localhost', port=2828)
client.start_session()
client.navigate('https://example.com')
print(client.title)
client.delete_session()
Errors
Common errors & fixes
ImportError: No module named 'marionette'
Wrong import path; the package is 'marionette_driver'.
fixInstall the correct package with 'pip install marionette-driver', then import from 'marionette_driver'.
marionette_driver.errors.MarionetteException: Connection refused
No Marionette server is running on the specified host:port.
fixStart Firefox with the --marionette flag or launch geckodriver before connecting.
AttributeError: 'Marionette' object has no attribute 'start_session'
Outdated library version (<3.0) where the API was different.
fixUpgrade to the latest version: 'pip install --upgrade marionette-driver'
TypeError: start_session() got an unexpected keyword argument 'timeout'
Passing deprecated parameters as keyword arguments in recent versions.
fixUse capabilities dict: 'client.start_session(capabilities={"marionette": True})' Upgrade
Version history
3.7.0latest on PyPI · released Apr 30, 2026
Audit
Dependencies
mozrunneroptionalRequired for launching Firefox binaries in some test harnesses
sixoptionalUsed for Python 2/3 compatibility (though library now requires Python >=3.8)