Install & Compatibility
Where this runs
tested against v3.3.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.026s · 17.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.022s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
send_magic_packet
✓ from wakeonlan import send_magic_packet
✗ from wakeonlan.wakeonlan import send_magic_packet
No need to specify inner module; top-level import is sufficient.
Basic usage: import the library and call send_magic_packet with a MAC address.
from wakeonlan import send_magic_packet
# Send WoL packet to a device with the given MAC address
send_magic_packet('aa:bb:cc:dd:ee:ff')
# You can also specify the IP address and port
send_magic_packet('aa:bb:cc:dd:ee:ff', ip_address='192.168.1.255', port=9)
# Works with IPv6 (requires wakeonlan >= 3.1.0)
# send_magic_packet('aa:bb:cc:dd:ee:ff', ip_address='ff02::1')
wakeonlan --version
Errors
Common errors & fixes
OSError: [Errno 13] Permission denied
Creating raw socket requires root/admin privileges on some systems.
fixRun the script with sudo (Linux/Mac) or as Administrator (Windows). Alternatively, use the library's default UDP broadcast method (no raw socket typically needed).
AttributeError: module 'wakeonlan' has no attribute 'send_magic_packet'
Old version of wakeonlan (< 1.0.0?) or incorrect import path.
fixUpgrade to latest version: pip install --upgrade wakeonlan. Import using: from wakeonlan import send_magic_packet
ValueError: invalid MAC address
MAC address uses invalid characters or wrong format.
fixUse format like 'AA:BB:CC:DD:EE:FF' (colon-separated hexadecimal pairs).
Upgrade
Version history
3.3.0latest on PyPI · released May 25, 2026
Audit
Dependencies
No dependency data recorded yet.