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

# Install & Upgrade

## Install phidata

We recommend installing `phidata` using `pip` in a python virtual environment

<Steps>
  <Step title="Create a virtual environment">
    Open the `Terminal` and create a python virtual environment.

    <CodeGroup>
      ```bash Mac theme={null}
      python3 -m venv ~/.venvs/aienv
      source ~/.venvs/aienv/bin/activate
      ```

      ```bash Windows theme={null}
      python3 -m venv aienv
      aienv/scripts/activate
      ```
    </CodeGroup>
  </Step>

  <Step title="Install phidata">
    Install the latest version of `phidata`

    <CodeGroup>
      ```bash Mac theme={null}
      pip install -U phidata
      ```

      ```bash Windows theme={null}
      pip install -U phidata
      ```
    </CodeGroup>
  </Step>
</Steps>

<Note>
  If you encounter errors, try updating pip using `python -m pip install --upgrade pip`
</Note>

***

## Upgrade phidata

To upgrade `phidata`, run this inside your virtual environment

```bash theme={null}
pip install -U phidata --no-cache-dir
```
