# Ray.init() hangs

**URL:** <https://discuss.ray.io/t/ray-init-hangs/2759>\
**Category:** Ray Core\
**Created:** [July 2, 2021, 7:28pm UTC](https://discuss.ray.io/t/ray-init-hangs/2759 "2021-07-02T19:28:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkechols](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/rkechols/32/1237_2.png) [@rkechols](https://discuss.ray.io/u/rkechols)\
**Post date:** [July 2, 2021, 7:28pm UTC](https://discuss.ray.io/t/ray-init-hangs/2759/1 "2021-07-02T19:28:04Z")

</div>

When I call `ray.init()` (or `tune.run(...)`, which then eventually itself calls `ray.init()`), everything **hangs**.

I’ve tracked down the hang to line 1257 of `ray/worker.py`, which looks like this:

```auto
    worker.core_worker = ray._raylet.CoreWorker(
        mode, node.plasma_store_socket_name, node.raylet_socket_name, job_id,
        gcs_options, node.get_logs_dir_path(), node.node_ip_address,
        node.node_manager_port, node.raylet_ip_address, (mode == LOCAL_MODE),
        driver_name, log_stdout_file_path, log_stderr_file_path,
        serialized_job_config, node.metrics_agent_port, runtime_env_hash)

```

I wasn’t able to track it down further because even trying to “step in” hangs.

Using ray 1.4.1 on Windows in a python 3.7.9 venv.

---

<div class="post-metadata">

**Author:** ![sangcho](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sangcho/32/425_2.png) [@sangcho](https://discuss.ray.io/u/sangcho)\
**Post date:** [July 7, 2021, 8:23pm UTC](https://discuss.ray.io/t/ray-init-hangs/2759/2 "2021-07-07T20:23:11Z")

</div>

Hmm I believe it is a known issue that Ray hangs on Windows when it is used with venv. Maybe if you use conda, the issue will be fixed. Is it possible for you to verify that?

---

<div class="post-metadata">

**Author:** ![rkechols](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/rkechols/32/1237_2.png) [@rkechols](https://discuss.ray.io/u/rkechols)\
**Post date:** [July 8, 2021, 6:45am UTC](https://discuss.ray.io/t/ray-init-hangs/2759/3 "2021-07-08T06:45:07Z")

</div>

That did do it.  
I installed conda ([using chocolatey](https://community.chocolatey.org/packages/anaconda3)), made a conda environment, then installed `ray-core` (1.4.0) to that conda environment from `conda-forge`. When running in this conda environment, `ray.init()` did not hang, and successfully gave me the info such as `node_ip_address`
