Skip to main content

Local Environment

Python is the go-to language for Ray development. Anyscale and Ray require a Python 3.6, 3.7, or 3.8 environment. We have found Anaconda to provide a good basis for managing multiple Python environments, and it also is available for many operating systems. 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.7 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 ray
pip install anyscale

These two libraries will be available and frozen in this environment alone.

note

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