# Can I import slicer by python?

**URL:** https://discourse.slicer.org/t/can-i-import-slicer-by-python/19189
**Category:** Development
**Created:** [August 13, 2021, 11:13pm UTC](https://discourse.slicer.org/t/can-i-import-slicer-by-python/19189 "2021-08-13T23:13:38Z")
**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: [August 13, 2021, 11:13pm UTC](https://discourse.slicer.org/t/can-i-import-slicer-by-python/19189/1 "2021-08-13T23:13:38Z")

</div>

Can I install slicer in python by

```auto
pip install slicer
or
pip install pyslicer

```

I can’t find such a way.

I know that I can firstly compile 3D slicer in c++, and then wrap it with python. But, I have compiled 3D slicer several times, and all failed.

Hope a simple way to install 3D slicer in python.

---

<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: [August 14, 2021, 1:46pm UTC](https://discourse.slicer.org/t/can-i-import-slicer-by-python/19189/2 "2021-08-14T13:46:15Z")

</div>

Slicer is not distributed on PyPI. You need to download the Slicer installation package and run the Slicer executable, which embeds Python. You can pip-install any Python packages in this Slicer’s embedded Python environment. You can also run Slicer as [Jupyter notebook kernel](https://github.com/Slicer/SlicerJupyter/).

How would you like to use Slicer? What kind of data do you work with?
