# instinct: cure playwright-service は /usr/bin/python3 を使う(venv 不可)

## 要約

cure の `playwright-service.service` は shadow の venv パスが cure に存在しないため、`/usr/bin/python3` を ExecStart に使う必要がある。

## 症状

```
systemctl status playwright-service.service
→ status=203/EXEC
→ ExecStart=/home/ubuntu/workspace/web/vvv/venv/bin/python3 ... が見つからない
```

## 原因

`/etc/systemd/system/playwright-service.service` の ExecStart が shadow の venv パスを参照していたが、cure には venv が存在しない。

## 修正(2026-07-27 実施済み)

```bash
sudo sed -i 's|/home/ubuntu/workspace/web/vvv/venv/bin/python3|/usr/bin/python3|g' /etc/systemd/system/playwright-service.service
sudo systemctl daemon-reload
sudo systemctl restart playwright-service.service
```

## playwright のバージョン管理

cure には chromium_headless_shell-1208(playwright 1.58.0 用)を追加インストールした:

```bash
python3 -m playwright install chromium-headless-shell
```

cure の playwright は `/home/ubuntu/.local/lib/python3.12/site-packages/playwright/` に入っている(システム Python)。

## fastapi バージョン

- apt 版 `python3-fastapi` は 0.101.0 → `lifespan` パラメータ非対応でエラー
- `sudo pip3 install --break-system-packages "fastapi>=0.109.0" "uvicorn>=0.27.0"` で 0.140.0 に更新済み