Files
agent/skills/image-process/requirements.txt
T
kicer 8764fedabc feat(local): 声明技能 Python 依赖,并放开「缺包自装进 skills/deps」
本地没有 agent-executor-init,技能的 requirements.txt 从来没人读:
document-photo-to-pdf(numpy/Pillow/pymupdf)与 image-process(Pillow)
在本机只是碰巧用户的 python 里已经装了。

- 两个技能补 requirements.txt,一律不写版本号:服务端 init 用
  pip install --no-index --dry-run 探测,pin 到与镜像不同的版本会让探测失败,
  反而往 skills/deps 装一份旧的(PYTHONPATH 优先级高于系统 site-packages)
- start.sh 起 core 时注入 AGENT_SKILLS_DEPS(该目录本来就在 PYTHONPATH 里),
  把路径交给模型;terminal 与技能子进程都继承 core 的 env,装完下次运行即生效
- env-local.txt 把「永远不要自己装任何东西」换成「缺包时 --target 装进共享依赖层,
  别动系统 Python」。用 --target 是因为 pip 对它的 PEP 668 拦截明确豁免,
  Homebrew 那种 externally-managed 解释器也能装
- 文档同步:local/README 已知限制、docs/local-mode.md 新增 4.13 记录取舍

服务端不受影响:这三行在 executor 镜像里都已满足(实测 --no-index --dry-run
均 exit 0),init 只写一个 gitignore 里的 .deps_installed 就跳过。
2026-11-11 16:59:28 +08:00

8 lines
392 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 本技能只用 Pillow(Image/ImageDraw/ImageFont/ImageOps)。
#
# 这份文件主要给「本地端」(local/)用:本机 python 缺包时按它补装。
# 不写版本号的原因见 skills/document-photo-to-pdf/requirements.txt 顶部的说明:
# 服务端 init 用 `pip install --no-index --dry-run` 探测,pin 到与镜像不同的版本会反向遮蔽镜像包。
Pillow