Installing Ray


Join our community slack to discuss Ray!

Ray currently supports MacOS and Linux. Windows wheels are now available, but Windows support is experimental and under development.

Official Releases

You can install the latest official version of Ray as follows. Official releases are produced according to the release process doc.

pip install -U ray

Note for Windows Users: To use Ray on Windows, Visual C++ runtime must be installed (see Windows Dependencies section). If you run into any issues, please see the Windows Support section.

Daily Releases (Nightlies)

You can install the latest Ray wheels via the following command. These daily releases are tested via automated tests but do not go through the full release process:

pip install -U ray
ray install-nightly


ray install-nightly may not capture updated library dependencies. After running ray install-nightly, consider running pip install ray[<library>] without upgrading (via -U) to update dependencies.


If you’re currently on ray<=1.0.1.post1, ray install-nightly will not install the most recent nightly wheels. Please use the links below instead.

Alternatively, here are the links to the latest wheels (which are built for each commit on the master branch). To install these wheels, use the following pip command and wheels instead of the ones above:

pip install -U [link to wheel]



Windows (experimental)

Linux Python 3.8

MacOS Python 3.8

Windows Python 3.8

Linux Python 3.7

MacOS Python 3.7

Windows Python 3.7

Linux Python 3.6

MacOS Python 3.6

Windows Python 3.6

Installing from a specific commit

You can install the Ray wheels of any particular commit on master with the following template. You need to specify the commit hash, Ray version, Operating System, and Python version:


For example, here are the Ray 2.0.0.dev0 wheels for Python 3.5, MacOS for commit a0ba4499ac645c9d3e82e68f3a281e48ad57f873:

pip install

Install Ray With Maven

The latest Ray Java release can be found in central repository. To use the latest Ray Java release in your application, add the following entries in your pom.xml:


The latest Ray Java snapshot can be found in sonatype repository. To use the latest Ray Java snapshot in your application, add the following entries in your pom.xml:

<!-- only needed for snapshot version of ray -->



When you run pip install to install Ray, Java jars are installed as well. The above dependencies are only used to build your Java code and to run your code in local mode.

If you want to run your Java code in a multi-node Ray cluster, it’s better to exclude Ray jars when packaging your code to avoid jar conficts if the versions (installed Ray with pip install and maven dependencies) don’t match.

Windows Support

Windows support is currently limited and “alpha” quality. Bugs, process/resource leaks, or other incompatibilities may exist under various scenarios. Unusual, unattended, or production usage is not recommended.

To use Ray on Windows, the Visual C++ runtime must be installed (see Windows Dependencies section).

If you encounter any issues, please try the following:

If your issue has not yet been addressed, comment on the Windows Known Issues page.

Windows Dependencies

For Windows, ensure the latest Visual C++ runtime (install link) is installed before using Ray.

Otherwise, you may receive an error similar to the following when Ray fails to find the runtime library files (e.g. VCRUNTIME140_1.dll):

FileNotFoundError: Could not find module '_raylet.pyd' (or one of its dependencies).

Installing Ray on Arch Linux

Note: Installing Ray on Arch Linux is not tested by the Project Ray developers.

Ray is available on Arch Linux via the Arch User Repository (AUR) as python-ray.

You can manually install the package by following the instructions on the Arch Wiki or use an AUR helper like yay (recommended for ease of install) as follows:

yay -S python-ray

To discuss any issues related to this package refer to the comments section on the AUR page of python-ray here.

Installing Ray with Anaconda

If you use Anaconda and want to use Ray in a defined environment, e.g, ray, use these commands:

conda create --name ray
conda activate ray
conda install --name ray pip
pip install ray

Use pip list to confirm that ray is installed.

Building Ray from Source

Installing from pip should be sufficient for most Ray users.

However, should you need to build from source, follow these instructions for building Ray.

Docker Source Images

Most users should pull a Docker image from the Ray Docker Hub.

Image releases are tagged using the following format:




The most recent Ray release.


A specific Ray release.


The most recent Ray build (the most recent commit on Github master)


A specific nightly build (uses a SHA from the Github master).

Each tag has variants that add or change functionality:




These are based off of an NVIDIA CUDA image. They require the Nvidia Docker Runtime.


These are based off of an Ubuntu image.

<no tag>

Aliases to -cpu tagged images

If you want to tweak some aspect of these images and build them locally, refer to the following script:

cd ray

Beyond creating the above Docker images, this script can also produce the following two images.

  • The rayproject/development image has the ray source code included and is setup for development.

  • The rayproject/examples image adds additional libraries for running examples.

Review images by listing them:

docker images

Output should look something like the following:

REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
rayproject/ray                      latest              7243a11ac068        2 days ago          1.11 GB
rayproject/ray-deps                 latest              b6b39d979d73        8 days ago          996  MB
rayproject/base-deps                latest              5606591eeab9        8 days ago          512  MB
ubuntu                              focal               1e4467b07108        3 weeks ago         73.9 MB

Launch Ray in Docker

Start out by launching the deployment container.

docker run --shm-size=<shm-size> -t -i rayproject/ray

Replace <shm-size> with a limit appropriate for your system, for example 512M or 2G. A good estimate for this is to use roughly 30% of your available memory (this is what Ray uses internally for its Object Store). The -t and -i options here are required to support interactive use of the container.

Note: Ray requires a large amount of shared memory because each object store keeps all of its objects in shared memory, so the amount of shared memory will limit the size of the object store.

You should now see a prompt that looks something like:


Test if the installation succeeded

To test if the installation was successful, try running some tests. This assumes that you’ve cloned the git repository.

python -m pytest -v python/ray/tests/


If importing Ray (python3 -c "import ray") in your development clone results in this error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File ".../ray/python/ray/", line 63, in <module>
    import ray._raylet  # noqa: E402
  File "python/ray/_raylet.pyx", line 98, in init ray._raylet
    import ray.memory_monitor as memory_monitor
  File ".../ray/python/ray/", line 9, in <module>
    import psutil  # noqa E402
  File ".../ray/python/ray/thirdparty_files/psutil/", line 159, in <module>
    from . import _psosx as _psplatform
  File ".../ray/python/ray/thirdparty_files/psutil/", line 15, in <module>
    from . import _psutil_osx as cext
ImportError: cannot import name '_psutil_osx' from partially initialized module 'psutil' (most likely due to a circular import) (.../ray/python/ray/thirdparty_files/psutil/

Then you should run the following commands:

rm -rf python/ray/thirdparty_files/
python3 -m pip install setproctitle