Skip to content

Commit 5299a7b

Browse files
authored
Merge pull request alibaba#287 from liuxiaopai-ai/codex/docs-code-interpreter-pip-shell
docs(code-interpreter): add runtime pip install shell examples
2 parents 45e2e10 + ddb52ea commit 5299a7b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

sdks/code-interpreter/python/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ with sandbox:
126126
sandbox.kill()
127127
```
128128

129+
### Installing Python packages at runtime
130+
131+
You can install packages directly via `sandbox.commands.run(...)`:
132+
133+
```python
134+
execution = await sandbox.commands.run("pip install pandas numpy")
135+
```
136+
129137
## Runtime Configuration
130138

131139
### Docker Image

sdks/code-interpreter/python/README_zh.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ with sandbox:
121121
sandbox.kill()
122122
```
123123

124+
### 运行时安装 Python 依赖
125+
126+
可以直接通过 `sandbox.commands.run(...)` 安装依赖:
127+
128+
```python
129+
execution = await sandbox.commands.run("pip install pandas numpy")
130+
```
131+
124132
## 运行时配置
125133

126134
### Docker 镜像

0 commit comments

Comments
 (0)