# Simplest way to start Julia with threading on MacOS

**URL:** <https://discourse.julialang.org/t/simplest-way-to-start-julia-with-threading-on-macos/90016>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 10, 2022, 1:26am UTC](https://discourse.julialang.org/t/simplest-way-to-start-julia-with-threading-on-macos/90016 "2022-11-10T01:26:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rasmushenningsson](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rasmushenningsson](https://discourse.julialang.org/u/rasmushenningsson)\
**Post date:** [November 10, 2022, 1:26am UTC](https://discourse.julialang.org/t/simplest-way-to-start-julia-with-threading-on-macos/90016/1 "2022-11-10T01:26:57Z")

</div>

Simplest way to start Julia with threading on MacOS

Hi!

I have a collaborator with a Mac computer but without admin rights.  
Julia is installed on the computer, but not added to path.

Now, I want to find the simplest possible way to start Julia with threading. (My knowledge of MacOS is limited.)

Some alternatives:

1. Set a persistent environment variable `JULIA_NUM_THREADS`. Is this possible without admin rights? How do I do it so that it affects Julia when run from the dock/launchpad and not only from the terminal?

2. Create a shell script launching julia with `-t auto`. The user must then use this instead of launching Julia from the dock/launchpad.

Are there other ways?

It seems like it should be simple, but I really don’t know how to achieve this in a way that’s convenient for the user.

The user has no experience with a terminal or environment variables, but I can get access to the computer if that’s necessary.

---

<div class="post-metadata">

**Author:** ![mkoculak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkoculak/32/28310_2.png) [@mkoculak](https://discourse.julialang.org/u/mkoculak)\
**Post date:** [November 10, 2022, 1:30am UTC](https://discourse.julialang.org/t/simplest-way-to-start-julia-with-threading-on-macos/90016/2 "2022-11-10T01:30:52Z")

</div>

Using VSCode + setting the path to Julia and number of threads in the options of the extension?

---

<div class="post-metadata">

**Author:** ![rasmushenningsson](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rasmushenningsson](https://discourse.julialang.org/u/rasmushenningsson)\
**Post date:** [November 10, 2022, 1:44am UTC](https://discourse.julialang.org/t/simplest-way-to-start-julia-with-threading-on-macos/90016/3 "2022-11-10T01:44:48Z")

</div>

Thanks, I didn’t think of that since I don’t use VSCode myself.  
But it does sound easier than my other alternatives!

Unfortunately it’s also not possible to install VSCode without admin rights, so if possible I would like to avoid that. (But going to IT again and ask them to install another program should be possible.)

---

<div class="post-metadata">

**Author:** ![viralbshah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/viralbshah/32/54_2.png) [@viralbshah](https://discourse.julialang.org/u/viralbshah)\
**Post date:** [November 10, 2022, 4:47am UTC](https://discourse.julialang.org/t/simplest-way-to-start-julia-with-threading-on-macos/90016/4 "2022-11-10T04:47:17Z")

</div>

Use a startup.jl file?

---

<div class="post-metadata">

**Author:** ![rasmushenningsson](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rasmushenningsson](https://discourse.julialang.org/u/rasmushenningsson)\
**Post date:** [November 10, 2022, 4:50am UTC](https://discourse.julialang.org/t/simplest-way-to-start-julia-with-threading-on-macos/90016/5 "2022-11-10T04:50:51Z")

</div>

It’s too late to set `JULIA_NUM_THREADS` in startup.jl, isn’t it?  
[https://docs.julialang.org/en/v1/manual/environment-variables/](https://docs.julialang.org/en/v1/manual/environment-variables/)
