Install & Compatibility
Where this runs
tested against v5.3.27 · 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.722s · 45.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.2s · import 0.674s · 48MB
45MB installed
● package 45MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
to_bytes
✓ from eth_utils import to_bytes
✗ from faster_eth_utils import to_bytes
faster-eth-utils is a drop-in replacement; import from eth_utils as usual, but the C implementation is used automatically if installed.
to_checksum_address
✓ from eth_utils import to_checksum_address
✗ from faster_eth_utils import to_checksum_address
Same as above; import from eth_utils.
keccak
✓ from eth_utils import keccak
✗ from faster_eth_utils import keccak
Use eth_utils for all imports; faster-eth-utils monkey-patches or replaces under the hood.
Basic usage: import from eth_utils as if using the original eth-utils. faster-eth-utils accelerates functions transparently.
from eth_utils import to_bytes, to_checksum_address, keccak
# Example: convert hex to bytes
result = to_bytes(hexstr='0xdeadbeef')
print(result)
# Example: checksum address
addr = to_checksum_address('0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed')
print(addr)
# Example: keccak hash
hash = keccak(b'test')
print(hash.hex())
Errors
Common errors & fixes
ImportError: cannot import name 'to_bytes' from 'eth_utils'
Missing dependency or incompatible version of eth-utils / faster-eth-utils.
fixEnsure faster-eth-utils is installed (pip install faster-eth-utils) and that eth-utils is not installed separately.
ModuleNotFoundError: No module named 'eth_utils'
faster-eth-utils is not installed, or the import path is wrong.
fixInstall faster-eth-utils (pip install faster-eth-utils). Import from eth_utils, not faster_eth_utils.
TypeError: to_bytes() got an unexpected keyword argument 'hexstr'
Using an older version of eth-utils API that is not supported in faster-eth-utils.
fixCheck the function signature in the latest documentation. For to_bytes, use hexstr= parameter as shown, or upgrade to the latest version.
Upgrade
Version history
5.3.27latest on PyPI · released May 27, 2026
Audit
Dependencies
No dependency data recorded yet.