# Automatic install of Python packages

**URL:** <https://discourse.slicer.org/t/automatic-install-of-python-packages/7078>\
**Category:** Development\
**Created:** [June 7, 2019, 11:33pm UTC](https://discourse.slicer.org/t/automatic-install-of-python-packages/7078 "2019-06-07T23:33:23Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [June 8, 2019, 7:46pm UTC](https://discourse.slicer.org/t/automatic-install-of-python-packages/7078/4 "2019-06-08T19:46:16Z")

</div>

On mac (and probably linux) this works:

```auto
>>> import os
>>> os.system('PythonSlicer -m pip install pandas')
0
>>> import pandas

```

On windows, this process pops up the access control permission dialog:

```auto
import os
os.system('powershell.exe Start-Process cmd.exe -Verb runAs')

```

And then in the shell I could run this:

```auto
"c:\Program Files\Slicer 4.11.0-2019-06-02\bin\PythonSlicer.exe" -m pip install pandas

```

We should be able to streamline this and integrate it with the extension install process.

We discussed this on the developer call the other day and were thinking we should start collecting this information along with guidelines about which python packages should work and which might cause trouble.

---

_[View the full topic](https://discourse.slicer.org/t/automatic-install-of-python-packages/7078)._
