Registry / devops / e2b-desktop

e2b-desktop

JSON →
library2.4.0pypypi✓ verified 85d ago

E2B Desktop Sandbox provides a cloud-based desktop environment for running GUI applications and browser automation. Version 2.4.0 supports Python 3.10+, actively maintained with frequent releases.

pip install e2b-desktop
INSTALL
IMPORT
SIG · E2B-DESKTOP
E
e2b-desktop
devopspythonv2.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Sandbox
from e2b_desktop import Sandbox
from e2b import Sandbox
Incorrect import; package uses underscore in module name.
run_code
from e2b_desktop import run_code
Direct import works, no alias needed.

Initialize a sandbox with API key (set via E2B_API_KEY env var), run code, and clean up.

import os from e2b_desktop import Sandbox api_key = os.environ.get('E2B_API_KEY', '') sbx = Sandbox(api_key=api_key) # Runs code in the sandbox output = sbx.run_code('print("Hello from E2B Desktop")') print(output) sbx.close()
Debug
Known issues
breakingBreaking change in v2.x: The API key is now required and must be passed to Sandbox constructor or set as E2B_API_KEY environment variable.
fix
Update code to provide api_key parameter to Sandbox() or set E2B_API_KEY.
affects: >=2.0.0
gotchaImport path uses underscore: e2b_desktop, not e2b or e2b-desktop (with hyphen).
fix
Use 'from e2b_desktop import Sandbox'.
affects: all
deprecatedOld client from e2b package is deprecated; use e2b-desktop for desktop sandboxes.
fix
Migrate to e2b-desktop and use new import paths.
affects: <2.0.0
Errors
Common errors & fixes
ImportError: cannot import name 'Sandbox' from 'e2b'
Incorrect import path; Sandbox is in e2b_desktop, not e2b.
fix
Install e2b-desktop and import from e2b_desktop: 'from e2b_desktop import Sandbox'
E2BError: API key is required
Missing API key in constructor or environment variable.
fix
Set E2B_API_KEY environment variable or pass api_key parameter to Sandbox().
RuntimeError: Sandbox closed
Reusing a sandbox after it has been closed.
fix
Create a new Sandbox instance for each session.
Upgrade
Version history
2.4.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
e2b-desktop — pip install e2b-desktop · libregistry