# Slicer-Python Packages Use and Install

**URL:** <https://discourse.slicer.org/t/slicer-python-packages-use-and-install/984>\
**Category:** Support\
**Created:** [August 31, 2017, 9:27pm UTC](https://discourse.slicer.org/t/slicer-python-packages-use-and-install/984 "2017-08-31T21:27:14Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [September 1, 2017, 10:49pm UTC](https://discourse.slicer.org/t/slicer-python-packages-use-and-install/984/9 "2017-09-01T22:49:15Z")

</div>

I’ve tried this on the latest nightly version and it all works well for me!

1. Start Slicer as administrator: in the start menu, instead of left-click on the Slicer icon, use right-click, then select `More...` and `Run as Administrator`.

2. Install a package by using `pip`. For example, installing of `requests` package:

Enter this into the Python interactor:

```
import pip
pip.main(['install', 'requests'])

```

The package is successfully downloaded and installed:

```
Collecting requests
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
Collecting idna<2.7,>=2.5 (from requests)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
Collecting urllib3<1.23,>=1.21.1 (from requests)
  Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
Collecting certifi>=2017.4.17 (from requests)
  Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)
Collecting chardet<3.1.0,>=3.0.2 (from requests)
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
Installing collected packages: idna, urllib3, certifi, chardet, requests
  Found existing installation: chardet 2.3.0
    Uninstalling chardet-2.3.0:
      Successfully uninstalled chardet-2.3.0
Successfully installed certifi-2017.7.27.1 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22
0

```

Dependent packages are updated, therefore before using the installed `requests` package, you need to restart Slicer (you can use the `restart()` command in the Python console).

---

_[View the full topic](https://discourse.slicer.org/t/slicer-python-packages-use-and-install/984)._
