# How do I import external modules to 3d slicer?

**URL:** https://discourse.slicer.org/t/how-do-i-import-external-modules-to-3d-slicer/27733
**Category:** Support
**Tags:** python
**Created:** [February 10, 2023, 12:38am UTC](https://discourse.slicer.org/t/how-do-i-import-external-modules-to-3d-slicer/27733 "2023-02-10T00:38:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dsa934](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dsa934/32/17907_2.png) [@dsa934](https://discourse.slicer.org/u/dsa934)
#### Post date: [February 10, 2023, 12:38am UTC](https://discourse.slicer.org/t/how-do-i-import-external-modules-to-3d-slicer/27733/1 "2023-02-10T00:38:39Z")

</div>

Operating system: window 10  
Slicer version: 5.2.1

When creating extension code, import external libraries (e.g paramiko, etc) as follows.

```auto
# some extension codes

import paramiko
import ....

```

In a general IDE, a virtual environment is built using Anaconda and then packages are installed (in python). or using c-make (in c++) How can I add the above packages to 3D Slicer?

---

<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: [February 10, 2023, 3:09pm UTC](https://discourse.slicer.org/t/how-do-i-import-external-modules-to-3d-slicer/27733/2 "2023-02-10T15:09:32Z")

</div>

You should be able to do `pip_install("paramiko")` in the Slicer python console and the import.
