diff --git a/packages/py-ray/package.py b/packages/py-ray/package.py
index 55bdd87d1f47c4ab893346d4f71e05687717b390..da6ae703cb6d4e6fd0a3b663efd0b9c2c92cc845 100644
--- a/packages/py-ray/package.py
+++ b/packages/py-ray/package.py
@@ -20,7 +20,7 @@ class PyRay(PythonPackage):
 
     depends_on("python@3.6:3.10", when="@2.0.1", type=("build", "run"))
     depends_on("python@3.6:3.8", when="@0.8.7", type=("build", "run"))
-    depends_on("bazel@4.2.2:", when="@2.0.1", type="build")
+    depends_on("bazel@4.2.2:5", when="@2.0.1", type="build")
     depends_on("bazel@3.2.0", when="@0.8.7", type="build")
     depends_on("npm", type="build")
     depends_on("py-setuptools", type="build")