# How can I use 3DSlicer by python?

**URL:** <https://discourse.slicer.org/t/how-can-i-use-3dslicer-by-python/14808>\
**Category:** Support\
**Created:** [November 29, 2020, 6:58pm UTC](https://discourse.slicer.org/t/how-can-i-use-3dslicer-by-python/14808 "2020-11-29T18:58:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhang-qiang-github](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhang-qiang-github/32/9019_2.png) [@zhang-qiang-github](https://discourse.slicer.org/u/zhang-qiang-github)\
**Post date:** [November 29, 2020, 6:58pm UTC](https://discourse.slicer.org/t/how-can-i-use-3dslicer-by-python/14808/1 "2020-11-29T18:58:18Z")

</div>

Thanks for all developer for 3D slicer. Currently, I want to use the semi-automatic segmentation method of 3D slicer in python.

1. Can I install 3D slicer by `pip install slicer`?
2. Which module of 3D slicer is designed for semi-automatic segmentation?

It is appreciated for any suggestion.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 29, 2020, 7:00pm UTC](https://discourse.slicer.org/t/how-can-i-use-3dslicer-by-python/14808/2 "2020-11-29T19:00:59Z")

</div>

Slicer has a Python environment set up and you can install in it any additional Python packages that you need (using the `pip_install()` convenience function). You can find examples of using segmentation tools from Python in the [script repository](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script).
