Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Error importing ray in colab due to pyarrow #5033
Describe the problem
Very simple, just pip install ray, then import ray:
on Google colab and it fails with:
Take a look at this gist running on colab
Thanks for reporting this! This error happens because colab is preloading certain libraries (more on this below). To fix it, you can do the following:
and then click on
Now as to why colab's preloading is problematic: Ray depends on a library called pyarrow for serialization and some other things. Because TensorFlow's binary package is not compliant with the manylinux1 standard , we need to ship a custom version of pyarrow that is compatible with TensorFlow. Until TensorFlow is fixed, we don't really have a choice here, so sorry for that.
Ah yes, you are right. I had tried the uninstall command, but I had not restarted the runtime after uninstalling. That is the trick. Thank you for your quick response.
Can I leave it to you to decide whether you want to close the issue? Because it is obviously an issue, but like you said it is out of your control (unless you can remove the pyarrow dependency maybe?).
Yeah, we can leave it open for now, since it actually is an issue and might make it easier for people to find. If this happens broadly on colab, we can add a pointer in the error message on what to do. Dropping pyarrow is not really an option unfortunately because our fast serialization depends on it.