# Cannot setup the runtime env

**URL:** <https://discuss.ray.io/t/cannot-setup-the-runtime-env/5105>\
**Category:** Ray Core\
**Created:** [February 17, 2022, 12:16pm UTC](https://discuss.ray.io/t/cannot-setup-the-runtime-env/5105 "2022-02-17T12:16:25Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [February 22, 2022, 6:07pm UTC](https://discuss.ray.io/t/cannot-setup-the-runtime-env/5105/9 "2022-02-22T18:07:56Z")

</div>

Ah thanks for finding this! It’s too bad that `pip` doesn’t show an error message in this case (it seems to hang at ` Collecting torch==1.10.2` according to the traceback posted earlier.)

> I am not sure how to add this line to requirements.txt or runtime\_env

[python - How to format requirements.txt when package source is from specific websites? - Stack Overflow](https://stackoverflow.com/a/61742742/14651138) has a detailed answer; you can just include it as a line in requirements.txt.

Note that we unfortunately had a regression for including such options in `requirements.txt` in Ray 1.10 ([[Bug] Python: --extra-index-url does not work in requirements file anymore · Issue #22056 · ray-project/ray · GitHub](https://github.com/ray-project/ray/issues/22056)), so you would need to use Ray 1.9 or earlier or use Ray 1.11.0rc0 (`pip install ray[default]==1.11.0rc0`) for this to work, or use a nightly build that contains the bugfix. Alternatively, you can set the `-f` `--find-links` flag using an environment variable: [Configuration - pip documentation v23.3.1](https://pip.pypa.io/en/stable/topics/configuration/#environment-variables). But note that this environment variable should be set on the cluster before Ray is started (e.g. with `ray start`), otherwise the runtime env pip process won’t see it.

---

_[View the full topic](https://discuss.ray.io/t/cannot-setup-the-runtime-env/5105)._
