diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt index 51c9caae5..37b0491a3 100644 --- a/doc/requirements-doc.txt +++ b/doc/requirements-doc.txt @@ -5,6 +5,7 @@ funcsigs mock numpy opencv-python +pyarrow psutil recommonmark redis diff --git a/doc/source/conf.py b/doc/source/conf.py index 9c878782c..a56966936 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -32,8 +32,6 @@ MOCK_MODULES = ["gym", "tensorflow.python", "tensorflow.python.client", "tensorflow.python.util", - "pyarrow", - "pyarrow.plasma", "smart_open", "ray.local_scheduler", "ray.plasma", diff --git a/python/ray/__init__.py b/python/ray/__init__.py index 29ba19a4e..8fd789798 100644 --- a/python/ray/__init__.py +++ b/python/ray/__init__.py @@ -4,6 +4,12 @@ from __future__ import print_function import os import sys + +if "pyarrow" in sys.modules: + raise ImportError("Ray must be imported before pyarrow because Ray " + "requires a specific version of pyarrow (which is " + "packaged along with Ray).") + # Add the directory containing pyarrow to the Python path so that we find the # pyarrow version packaged with ray and not a pre-existing pyarrow. pyarrow_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),