# Using Ray with pyinstaller

**URL:** https://discuss.ray.io/t/using-ray-with-pyinstaller/9891
**Category:** Uncategorized
**Created:** [March 24, 2023, 9:04pm UTC](https://discuss.ray.io/t/using-ray-with-pyinstaller/9891 "2023-03-24T21:04:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Carl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/carl/32/4107_2.png) [@Carl](https://discuss.ray.io/u/Carl)
#### Post date: [March 24, 2023, 9:04pm UTC](https://discuss.ray.io/t/using-ray-with-pyinstaller/9891/1 "2023-03-24T21:04:07Z")

</div>

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

- High: It blocks me to complete my task.

I use ray for multiprocessing, works fine in terminal. when compiling with pyinstaller to .exe, the ray is initialised and then multiple instances of the app is opened, one for each thread. Microsoft Windows 10 then crashes

---

<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: [March 24, 2023, 10:13pm UTC](https://discuss.ray.io/t/using-ray-with-pyinstaller/9891/2 "2023-03-24T22:13:15Z")

</div>

@Carl We have to admit that Ray has not been battled tested on Windows.

Can you check the Ray logs. `ray logs --help`

---

<div class="post-metadata">

### Author: ![Nadav\_Weinstein](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/nadav_weinstein/32/3953_2.png) [@Nadav\_Weinstein](https://discuss.ray.io/u/Nadav_Weinstein)
#### Post date: [May 16, 2023, 11:08am UTC](https://discuss.ray.io/t/using-ray-with-pyinstaller/9891/3 "2023-05-16T11:08:40Z")

</div>

I also run into the same issue.  
Does anyone have enough experience to come up with a solution or an explanation to this?

---

<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 16, 2023, 6:30pm UTC](https://discuss.ray.io/t/using-ray-with-pyinstaller/9891/4 "2023-05-16T18:30:43Z")

</div>

@Nadav_Weinstein

cc: @pcmoritz Any insight into the Windows issue?

---

<div class="post-metadata">

### Author: ![Carl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/carl/32/4107_2.png) [@Carl](https://discuss.ray.io/u/Carl)
#### Post date: [May 16, 2023, 7:12pm UTC](https://discuss.ray.io/t/using-ray-with-pyinstaller/9891/5 "2023-05-16T19:12:41Z")

</div>

I ended up with using ray remote with a linux box. It allowed me to get the result I was looking for without the multiple instances opening. The performance of Ray is very good and impressive 😊

For using directly in Windows, I did not find a solution. Also, the ray log in Windows, I did not understand completely how to use it, because there were so many PID opening, one for each thread

---

<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 16, 2023, 7:44pm UTC](https://discuss.ray.io/t/using-ray-with-pyinstaller/9891/6 "2023-05-16T19:44:00Z")

</div>

@Carl Am glad that you could use it on Linux. Should we just close this issue then?

---

<div class="post-metadata">

### Author: ![Carl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/carl/32/4107_2.png) [@Carl](https://discuss.ray.io/u/Carl)
#### Post date: [May 16, 2023, 8:41pm UTC](https://discuss.ray.io/t/using-ray-with-pyinstaller/9891/7 "2023-05-16T20:41:11Z")

</div>

Yes we can close the issue, thank you for the support !
