# Installing AG2

Tip

We recommended using a virtual environment for your project to keep your packages contained. See [venv](https://docs.python.org/3/library/venv.html).

Warning

**From version 0.8**: The OpenAI package, `openai`, is not installed by default.

Install AG2 with your preferred model provider(s), for example: 
- `pip install "ag2[openai]"`  
- `pip install "ag2[gemini]"`  
- `pip install "ag2[anthropic,cohere,mistral]"`

On Mac OS, if you get "no matches found:", add a quote to the package name, for example: 
- `pip install "ag2[openai]"`

Install AG2 on your machine:

```
pip install "ag2[openai]"
```

Tip

If you have been using `autogen` or `pyautogen`, all you need to do is upgrade it using:

```
pip install -U "autogen[openai]"
```

or

```
pip install -U "pyautogen[openai]"
```

as `pyautogen`, `autogen`, and `ag2` are aliases for the same PyPI package.
