Skip to main content

Local Environment

Python is the go-to language for Ray development. Both Anyscale and Ray are compatible with Python versions 3.7 to 3.11. We recommend using Anaconda for managing multiple Python environments. Alternatively, Virtualenv and pyenv provide similar capabilities.

Set up Anaconda

On a Mac using zsh, these instructions install and set up Anaconda:

brew install conda
conda init zsh
source ~/.zshrc

For installation on other platforms, download and install Anaconda using Anaconda Installers.

Make an environment for your Anyscale work

Anaconda enables you to separate Python environments from one another so that their dependencies can be managed independently.

conda create -n anyscale-env python=3.10 pip
conda activate anyscale-env

This command creates a fresh environment. Any installations you make while the Conda environment called anyscale-env is active will be limited to just that environment.

When this environment is active, you'll notice that your python command will execute Python 3.7 and all imports will be resolved relative to a special directory for this environment. For example, you might run:

pip install "anyscale[all]"

The ray and anyscale libraries will be available and frozen in this environment alone, and all Anyscale CLI features will work.


If you're using a Mac powered by an ARM processor (Apple M1, Apple M1 Pro or Apple M1 Max) and Ray 2.6.3 or older, you'll have to run pip uninstall grpcio; conda install grpcio in your Conda environment for Ray and Anyscale to work.

Minimal Anyscale Installation

Anyscale can be installed with a minimal set of dependencies with pip install anyscale. This supports all Anyscale CLI commands, except those that have a dependency on ray. The minimal install option is useful if using the anyscale package in an environment which doesn't easily support installing ray.