Skip to content

fix(tools): Keep IPython available without matplotlib#267

Open
Gujiassh wants to merge 1 commit into
TencentCloudADP:mainfrom
Gujiassh:fix/local-python-shell-import-213
Open

fix(tools): Keep IPython available without matplotlib#267
Gujiassh wants to merge 1 commit into
TencentCloudADP:mainfrom
Gujiassh:fix/local-python-shell-import-213

Conversation

@Gujiassh

Copy link
Copy Markdown

Summary

Fixes #213.

This splits the local Python executor imports so a missing matplotlib installation does not hide a valid IPython installation. Code execution can still run without plot capture, while plot export remains enabled when matplotlib is installed.

The change also reports a clear error if IPython itself is unavailable.

Validation

  • UTU_LLM_TYPE=openai UTU_LLM_MODEL=dummy UV_PYTHON=/usr/bin/python3.12 uv run pytest tests/tools/test_local_python_executor.py -q
  • UV_PYTHON=/usr/bin/python3.12 uv run ruff check utu/tools/local_env/python.py tests/tools/test_local_python_executor.py tests/tools/test_python_executor_toolkit.py
  • UV_PYTHON=/usr/bin/python3.12 uv run ruff format --check utu/tools/local_env/python.py tests/tools/test_local_python_executor.py tests/tools/test_python_executor_toolkit.py
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

examples\data_analysis\main.py 报错

1 participant