Repository: ray-project/ray

Issue:
Ray cloudpickle, python, ray version check incompatible with `python setup.py develop`
### Describe the problem

When initializing ray that was installed with `python setup.py develop` we get the following error:

```
Exception: Version mismatch: The cluster was started with:
    Ray: 0.2.2
    Ray location: ray/__init__.pyc
    Python: 2.7.14
    Cloudpickle: 0.4.0
This process on node 192.168.1.205 was started with:
    Ray: 0.2.2
    Ray location: /Users/pcmoritz/ray/python/ray/__init__.pyc
    Python: 2.7.14
    Cloudpickle: 0.4.0
```

### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Mac OS
- **Ray installed from (source or binary)**: source
- **Ray version**: latest master
- **Python version**: 2.7
- **Exact command to reproduce**: 



Discussion:
Note that this only happens if ray is used from within the ray/ folder (e.g. running an example), so it is not super severe but we should nonetheless fix it to make the user experience smooth.
I'm having trouble reproducing this with Python 3.
I ran into the same issue as of commit 044548bcfff4af4fdf1150ba6e65501b55feaa94 . 

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Mac OS
Ray installed from (source or binary): source
Ray version: 044548bcfff4af4fdf1150ba6e65501b55feaa94
Python version: 2.7.12
Exact command to reproduce:
* inside ipython session: `import ray; ray.init()`
Does the error always happen? Or only if you are inside of `ray/python`?

Resolving patch:
diff --git a/python/ray/services.py b/python/ray/services.py
--- a/python/ray/services.py
+++ b/python/ray/services.py
@@ -8,6 +8,7 @@
 import json
 import os
 import psutil
+import pyarrow
 import random
 import redis
 import shutil
@@ -279,23 +280,25 @@ def wait_for_redis_to_start(redis_ip_address, redis_port, num_retries=5):
 
 
 def _compute_version_info():
-    """Compute the versions of Python, cloudpickle, and Ray.
+    """Compute the versions of Python, cloudpickle, pyarrow, and Ray.
 
     Returns:
         A tuple containing the version information.
     """
     ray_version = ray.__version__
-    ray_location = ray.__file__
+    ray_location = os.path.abspath(ray.__file__)
     python_version = ".".join(map(str, sys.version_info[:3]))
     cloudpickle_version = cloudpickle.__version__
-    return ray_version, ray_location, python_version, cloudpickle_version
+    pyarrow_version = pyarrow.__version__
+    return (ray_version, ray_location, python_version, cloudpickle_version,
+            pyarrow_version)
 
 
 def _put_version_info_in_redis(redis_client):
     """Store version information in Redis.
 
     This will be used to detect if workers or drivers are started using
-    different versions of Python, cloudpickle, or Ray.
+    different versions of Python, cloudpickle, pyarrow, or Ray.
 
     Args:
         redis_client: A client for the primary Redis shard.
@@ -307,7 +310,7 @@ def check_version_info(redis_client):
     """Check if various version info of this process is correct.
 
     This will be used to detect if workers or drivers are started using
-    different versions of Python, cloudpickle, or Ray. If the version
+    different versions of Python, cloudpickle, pyarrow, or Ray. If the version
     information is not present in Redis, then no check is done.
 
     Args:
@@ -332,12 +335,14 @@ def check_version_info(redis_client):
                         "    Ray location: " + true_version_info[1] + "\n"
                         "    Python: " + true_version_info[2] + "\n"
                         "    Cloudpickle: " + true_version_info[3] + "\n"
+                        "    Pyarrow: " + true_version_info[4] + "\n"
                         "This process on node " + node_ip_address +
                         " was started with:" + "\n"
                         "    Ray: " + version_info[0] + "\n"
                         "    Ray location: " + version_info[1] + "\n"
                         "    Python: " + version_info[2] + "\n"
-                        "    Cloudpickle: " + version_info[3])
+                        "    Cloudpickle: " + version_info[3] + "\n"
+                        "    Pyarrow: " + version_info[4])
 
 
 def start_redis(node_ip_address,


Test patch: