Install & Compatibility
Where this runs
tested against v4.4.2 · 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.062s · 18MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.060s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Actor
✓ from pykka import Actor
Standard import
ThreadingActor
✓ from pykka import ThreadingActor
Preferred for I/O-bound tasks
ActorRef
✓ from pykka import ActorRef
Reference to an actor instance
ActorRegistry
✓ from pykka import ActorRegistry
Global registry of actors
getattr
✓ from pykka import getattr
✗ from pykka.actor import getattr
getattr moved to top-level since v3
Define an actor class, start it, send a message, and stop.
import pykka
class Greeter(pykka.ThreadingActor):
def __init__(self, greeting='Hi'):
super().__init__()
self.greeting = greeting
def on_receive(self, message):
return f'{self.greeting}, {message}'
actor = Greeter.start(greeting='Hello').proxy()
print(actor.on_receive('World').get()) # Hello, World
actor.stop()
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pykka'
Pykka not installed or wrong Python environment.
fixInstall with 'pip install pykka' and verify Python version >=3.10.
AttributeError: 'MyActor' object has no attribute 'start'
Attempting to call start() on an instance instead of the class.
fixUse MyActor.start() (class method) not my_actor.start().
TimeoutError: Actor call timed out after ... seconds
Actor's on_receive never returned a value (or deadlocked).
fixEnsure every on_receive returns a result. If no result, call actor.stop() and return a default.
Upgrade
Version history
4.4.2latest on PyPI · released Mar 14, 2026
Audit
Dependencies
No dependency data recorded yet.