# Python librairies

**URL:** https://discourse.slicer.org/t/python-librairies/28623
**Category:** Development
**Tags:** python
**Created:** [March 28, 2023, 1:22pm UTC](https://discourse.slicer.org/t/python-librairies/28623 "2023-03-28T13:22:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nicolas\_Tempier](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/nicolas_tempier/32/17463_2.png) [@Nicolas\_Tempier](https://discourse.slicer.org/u/Nicolas_Tempier)
#### Post date: [March 28, 2023, 1:22pm UTC](https://discourse.slicer.org/t/python-librairies/28623/1 "2023-03-28T13:22:50Z")

</div>

Hello everyone,  
I have a little misunderstanding because I managed to install a python library "openslide-python==1.2.0  
"on my machine but when I try to install it on another machine on slicer, it returns the following error:  
Traceback (most recent call last):

File “”, line 1, in

File “/home/eric.bardinet/Slicer-5.2.2-linux-amd64/bin/Python/slicer/util.py”, line 3578, in pip\_install

```
_executePythonModule('pip', args)

```

File “/home/eric.bardinet/Slicer-5.2.2-linux-amd64/bin/Python/slicer/util.py”, line 3540, in \_executePythonModule

```
logProcessOutput(proc)

```

File “/home/eric.bardinet/Slicer-5.2.2-linux-amd64/bin/Python/slicer/util.py”, line 3509, in logProcessOutput

```
raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)

```

subprocess.CalledProcessError: Command ‘[’/home/nicolas.tempier/Slicer-5.2.2-linux-amd64/bin/…/bin/PythonSlicer’, ‘-m’, ‘pip’, ‘install’, ‘openslide-python’]’ returned non-zero exit status 1.

i installed it using pip\_install(‘openslide-python’) and it worked before …  
I tried pip\_install(‘pip install ugrade pip’)  
any ideas please ?

---

<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: [March 28, 2023, 1:56pm UTC](https://discourse.slicer.org/t/python-librairies/28623/2 "2023-03-28T13:56:59Z")

</div>

Unfortunately, `openslide-python` is a poorly implemented package, which [requires manual installation of additional components](https://openslide.org/api/python/#installing).

We implemented automatic installation of openslide binaries on Windows in [BigImage extension](https://github.com/gaoyi/SlicerBigImage). You could make your extension depend on BigImage extension, or - to simplify things - improve and extend BigImage extension to do what you need. For example, it would be nice if you could implement automatic openslide installation for linux and/or macos as well.

Note that `pip_install` is the officially supported method of Python package installation in Slicer, as we may need to add extra options in the future to customize the behavior of pip in Slicer.
