What if python version doesn't match between client and server

How severe does this issue affect your experience of using Ray?

  • None: Just asking a question out of curiosity
  • Low: It annoys or frustrates me for a moment.
  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.
  • High: It blocks me to complete my task.

Hi all,
I have a project which needs a ray client to submit a task , and the ray client is python 3.8 while ray server is python 3.10. I encountered the error: opcode 128. So what should I do to submit the task successfully since ray client has to be python 3.8 for some reason? Thank you so much for your kindness response.

hey @JUAN_CHEN welcome back to the community!

I think the expectation is that python/ray should be on the same version for the client and server. However, i’ll let our client/server maintainer give a definite answer. cc @ckw017

As Chen mentioned, we expect the client and the server to be on the same version of Python and Ray. In particular, under the hood we’re using cloudpickle to serialize objects which requires that the same version of python is used for serialization and deserialization. Details: cloudpickle · PyPI

Cloudpickle can only be used to send objects between the exact same version of Python .

1 Like

Thank you @ckw017 and @Chen_Shen .

Hello @ckw017,

How can we change the Python version on my AWS cluster?
Because I’m having this error: RuntimeError: Python minor versions differ between client and server: client is 3.10.6, server is 3.6.9

There is no direct way to do so, aside from recreating a new cluster that runs on the newer version.