# Path of slicer app

**URL:** <https://discourse.slicer.org/t/path-of-slicer-app/30398>\
**Category:** Support\
**Created:** [July 5, 2023, 2:22am UTC](https://discourse.slicer.org/t/path-of-slicer-app/30398 "2023-07-05T02:22:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [July 5, 2023, 2:22am UTC](https://discourse.slicer.org/t/path-of-slicer-app/30398/1 "2023-07-05T02:22:21Z")

</div>

Dear developer,  
I want to design a package which need the path of the slicer installed on user’s computer, is there some command that can find the path of the slicer location automatically?  
Best wishes,  
Joshua

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [July 5, 2023, 5:30am UTC](https://discourse.slicer.org/t/path-of-slicer-app/30398/2 "2023-07-05T05:30:14Z")

</div>

```auto
# all nodes are saved relative to this path
slicer.mrmlScene.GetRootDirectory() 
# write-able folder, you can use this to store any temporary data
slicer.app.temporaryPath 
# Slicer core binary folder
slicer.app.slicerHome 
# Slicer extensions folder
slicer.app.extensionsInstallPath 
# path of a scripted module (in this example: Sample Data module SampleData.py)
slicer.modules.sampledata.path 

```

---

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [July 7, 2023, 5:48am UTC](https://discourse.slicer.org/t/path-of-slicer-app/30398/3 "2023-07-07T05:48:42Z")

</div>

sorry, but I mean the launcher of slicer,  
such as /Applications/Slicer.app/Contents/MacOS/Slicer  
Best,  
Joshua

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [July 7, 2023, 6:13am UTC](https://discourse.slicer.org/t/path-of-slicer-app/30398/4 "2023-07-07T06:13:04Z")

</div>

> [@rbumm](#):
>
> ```auto
> # Slicer core binary folder
> slicer.app.slicerHome 
> 
> ```

Sorry I am not on a Mac, but what do you get with this call?

---

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [July 7, 2023, 6:14am UTC](https://discourse.slicer.org/t/path-of-slicer-app/30398/5 "2023-07-07T06:14:55Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/3/d3a7934388791c929a40726db2489bdd90c80ae7.png)  
I think it is incomplete?  
Thank you,  
Joshua

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [July 7, 2023, 6:27am UTC](https://discourse.slicer.org/t/path-of-slicer-app/30398/6 "2023-07-07T06:27:59Z")

</div>

> [@Kening\_Zhang](#):
>
> I want to design a package which need the path of the slicer installed on user’s computer, is there some command that can find the path of the slicer location automatically?

If Slicer is in the Applications directory of a Mac, you should be able to use

```auto
which Slicer

```

from bash.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [July 7, 2023, 1:37pm UTC](https://discourse.slicer.org/t/path-of-slicer-app/30398/7 "2023-07-07T13:37:58Z")

</div>

> [@Kening\_Zhang](#):
>
> ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/3/d3a7934388791c929a40726db2489bdd90c80ae7.png)  
> I think it is incomplete?

That looks correct to me. Just ignore the /Contents part and that is the mac application folder.
