# Call script in conda

**URL:** <https://discourse.slicer.org/t/call-script-in-conda/16473>\
**Category:** VMTK\
**Created:** [March 10, 2021, 4:58pm UTC](https://discourse.slicer.org/t/call-script-in-conda/16473 "2021-03-10T16:58:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![szhang](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@szhang](https://discourse.slicer.org/u/szhang)\
**Post date:** [March 10, 2021, 4:58pm UTC](https://discourse.slicer.org/t/call-script-in-conda/16473/1 "2021-03-10T16:58:33Z")

</div>

How can I call the script correctly? Here’s how my Miniconda3 window looks like

> (base) PS C:\> conda activate foo  
> (foo) PS C:\> vmtkimagereader  
> vmtkimagereader : The term ‘vmtkimagereader’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

---

<div class="post-metadata">

**Author:** ![mjg](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mjg](https://discourse.slicer.org/u/mjg)\
**Post date:** [March 16, 2021, 3:03am UTC](https://discourse.slicer.org/t/call-script-in-conda/16473/2 "2021-03-16T03:03:51Z")

</div>

I use pypes. [Pypes Documentation Link](http://www.vmtk.org/tutorials/PypesProgrammatically.html)

Example (paths are strings):

```
from vmtk import pypes

vmtkCommand = r'vmtkcenterlines -ifile ' + modelPath + r' -ofile ' + centerlinePath
myPype = pypes.PypeRun(vmtkCommand)
```

---

<div class="post-metadata">

**Author:** ![szhang](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@szhang](https://discourse.slicer.org/u/szhang)\
**Post date:** [April 12, 2021, 9:50pm UTC](https://discourse.slicer.org/t/call-script-in-conda/16473/3 "2021-04-12T21:50:12Z")

</div>

Thank you, mjg.  
Regarding my original question, I later realized it needs to be typing command in VMTK interface rather than in a shell command window.
