Install & Compatibility
Where this runs
tested against v13.1.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 1.152s · 29.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.4s · import 0.812s · 30MB
28MB installed
● package 28MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Chromecast
✓ from pychromecast import Chromecast
✗ import pychromecast; Chromecast()
Not a top-level attribute in the package module.
get_chromecasts
✓ from pychromecast import get_chromecasts
✗ from pychromecast.discover import get_chromecasts
get_chromecasts moved to top-level in v14.
ChromecastInfo
✓ from pychromecast import ChromecastInfo
Discovers Chromecasts on the network, connects to the first found, and plays a test video.
import os
import time
import pychromecast
casts, browser = pychromecast.get_chromecasts()
if casts:
cast = casts[0]
cast.wait()
print(cast.device.friendly_name)
mc = cast.media_controller
mc.play_media('http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4', 'video/mp4')
time.sleep(5)
browser.stop_discovery()
Errors
Common errors & fixes
AttributeError: module 'pychromecast' has no attribute 'Chromecast'
Importing directly from pychromecast module without knowing the correct import path.
fixUse from pychromecast import Chromecast or from pychromecast.controllers import Chromecast
TypeError: get_chromecasts() got multiple values for argument 'blocking'
Passing positional arguments that are now keyword-only in v14.
fixUse keyword arguments: get_chromecasts(blocking=True, callback=my_callback)
zeroconf.BadServiceType: Service type '_googlecast._tcp.local.' is not valid
Running multiple instances of ZeroConf service or incorrect zeroconf version.
fixEnsure only one zeroconf instance is active per process. Upgrade zeroconf to >=0.118.0.
Upgrade
Version history
14.0.10latest on PyPI · released Mar 7, 2026
Audit
Dependencies
protobufrequiredRequired for Chromecast protocol messages
zeroconfrequiredRequired for discovery