# install_extra_recovery_command

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/update_check/install_extra_recovery_command)

Return a manual recovery command for the current install method.

uv-managed installs can preserve the uv receipt's Python interpreter and
`--with` requirements, so their recovery command uses the same uv path as
the automatic installer. Unsupported methods keep the install-script command
and deliberately avoid reading uv receipts.

## Signature

```python
install_extra_recovery_command(
    extra: str,
) -> str
```

## Description

Propagates `ValueError` if `extra` fails PEP 508 validation, and (on the uv
path) `ExtrasIntrospectionError` if installed extras cannot be determined
safely or `ToolRequirementIntrospectionError` if the uv receipt's
interpreter or `--with` packages cannot be preserved safely.

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `extra` | `str` | Yes | Extra name to add. |

## Returns

`str`

Shell command string suitable for display in error messages.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2f56309d821db4a0d06ee03959cf842c91b7f228/libs/code/deepagents_code/update_check.py#L2492)