# Specify the python and version of the dependencies for ray job

**URL:** <https://discuss.ray.io/t/specify-the-python-and-version-of-the-dependencies-for-ray-job/10751>\
**Category:** Ray Core\
**Created:** [May 22, 2023, 2:36pm UTC](https://discuss.ray.io/t/specify-the-python-and-version-of-the-dependencies-for-ray-job/10751 "2023-05-22T14:36:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Y\_C](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/y_c/32/4142_2.png) [@Y\_C](https://discuss.ray.io/u/Y_C)\
**Post date:** [May 22, 2023, 2:36pm UTC](https://discuss.ray.io/t/specify-the-python-and-version-of-the-dependencies-for-ray-job/10751/1 "2023-05-22T14:36:32Z")

</div>

Hi, there seems to be a mistake in the documentation: [Environment Dependencies — Ray 2.4.0](https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#rte-per-job)

`{"packages":["tensorflow", "requests"], "pip_check": False, "pip_version": "==22.0.2;python_version=='3.8.11'"}`

With this command: `ray job submit --address="http://127.0.0.1:8265" --runtime-env-json='{ "working_dir": "./", "excludes": [".joblib", "/.venv-py3.10/", "/data/", ".yaml"], "pip": {"packages":["tensorflow", "requests"], "pip_check": False, "pip_version": "==22.0.2;python_version=='3.8.11'"}, "py_modules": ["training_with_ray_tasks"]}' -- python training_with_ray_tasks/driver.py`

I’m getting `json.decoder.JSONDecodeError: Expecting value: line 1 column 146 (char 145)`

What is the best practice for specifying my dependencies for a training job?

I noticed this limitation when I tried to specify scikit-learn version to 1.1.3 just by providing a requirements.txt cause the default ray image uses python3.7. [ray/Dockerfile at master · ray-project/ray · GitHub](https://github.com/ray-project/ray/blob/master/docker/base-deps/Dockerfile)

So I guess to use python3.10 I will need to specify the ray image to point to this one instead of the default 3.7 one? [Installing Ray — Ray 2.4.0](https://docs.ray.io/en/latest/ray-overview/installation.html#docker-images)  
However I’m not able to pull any of these images:  
`docker pull rayproject/ray:py310`, the tags also can’t be loaded from docker hub: [Docker](https://hub.docker.com/r/rayproject/ray/tags)

---

<div class="post-metadata">

**Author:** ![Y\_C](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/y_c/32/4142_2.png) [@Y\_C](https://discuss.ray.io/u/Y_C)\
**Post date:** [May 22, 2023, 3:14pm UTC](https://discuss.ray.io/t/specify-the-python-and-version-of-the-dependencies-for-ray-job/10751/2 "2023-05-22T15:14:55Z")

</div>

It turns out to be: `docker pull ` `docker.io/rayproject/ray:2.4.0-py310`

---

<div class="post-metadata">

**Author:** ![Jules\_Damji](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jules_damji/32/4058_2.png) [@Jules\_Damji](https://discuss.ray.io/u/Jules_Damji)\
**Post date:** [May 22, 2023, 9:20pm UTC](https://discuss.ray.io/t/specify-the-python-and-version-of-the-dependencies-for-ray-job/10751/3 "2023-05-22T21:20:13Z")

</div>

@Y_C Thanks for posting your issue. Can you try small chunks of --runtime-env-json = ‘{…}’ to see where it fails.

cc: @architkulkarni Do you see anything I don’t?

---

<div class="post-metadata">

**Author:** ![architkulkarni](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/architkulkarni/32/10_2.png) [@architkulkarni](https://discuss.ray.io/u/architkulkarni)\
**Post date:** [May 22, 2023, 10:11pm UTC](https://discuss.ray.io/t/specify-the-python-and-version-of-the-dependencies-for-ray-job/10751/4 "2023-05-22T22:11:46Z")

</div>

This particular JSON error usually means the JSON parsing isn’t working. Can you try this suggestion from GPT, which switches out the types of quotes:

```auto
ray job submit --address="http://127.0.0.1:8265" --runtime-env-json="{ \"working_dir\": \"./\", \"excludes\": [\".joblib\", \"/.venv-py3.10/\", \"/data/\", \".yaml\"], \"pip\": {\"packages\":[\"tensorflow\", \"requests\"], \"pip_check\": False, \"pip_version\": \"==22.0.2;python_version=='3.8.11'\"}, \"py_modules\": [\"training_with_ray_tasks\"]}" -- python training_with_ray_tasks/driver.py

```
