> ## Documentation Index
> Fetch the complete documentation index at: https://docs.root.io/llms.txt
> Use this file to discover all available pages before exploring further.

# pip

> Configure pip to use Root Library Catalog as a drop-in replacement for PyPI.

## Authentication

```bash theme={null}
echo "machine pkg.root.io login token password YOUR_ROOT_TOKEN" >> ~/.netrc
chmod 600 ~/.netrc
```

## Configure the Registry

```bash theme={null}
pip config set global.index-url https://pkg.root.io/pypi/simple &&
pip config set global.extra-index-url https://pypi.org/simple
```

## Install

```bash theme={null}
pip install -r requirements.txt
```

## Environment Variable

```bash theme={null}
export PIP_INDEX_URL="https://pkg.root.io/pypi/simple"
```

## CI/CD

```bash theme={null}
echo "machine pkg.root.io login token password $ROOT_TOKEN" >> ~/.netrc
chmod 600 ~/.netrc
pip config set global.index-url https://pkg.root.io/pypi/simple
pip config set global.extra-index-url https://pypi.org/simple
```

## Troubleshooting

| Issue              | Solution                                                         |
| ------------------ | ---------------------------------------------------------------- |
| `401 Unauthorized` | Check `~/.netrc` token and `chmod 600`                           |
| Package not found  | Confirm `extra-index-url` includes PyPI as fallback              |
| Hash mismatch      | Expected - Root-patched packages have different hashes than PyPI |
