Description
The documentation claims CodeBox automatically detects and installs missing packages (code-execution.mdx Step 2, quickstart-python.mdx, core-concepts.mdx). In practice, this does not work — importing a package not present in python:slim raises ModuleNotFoundError.
Reproduction
import asyncio
import boxlite
async def main():
async with boxlite.CodeBox() as codebox:
result = await codebox.run("""
import requests
response = requests.get('https://api.github.com/zen')
print(response.text)
""")
print(result)
asyncio.run(main())
Expected
CodeBox detects import requests, installs requests via pip, then re-runs the code.
Actual
ModuleNotFoundError: No module named 'requests'
Environment
- boxlite 0.5.10
- macOS Apple Silicon
- Python 3.12
Notes
install_package("requests") works fine when called explicitly. The issue is specifically the auto-detection + auto-install feature.