# Call binary from Plex plugin

**URL:** https://forums.plex.tv/t/call-binary-from-plex-plugin/110649
**Category:** Dev/API Corner
**Tags:** other-dev
**Created:** [August 8, 2015, 4:15pm UTC](https://forums.plex.tv/t/call-binary-from-plex-plugin/110649 "2015-08-08T16:15:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![avelicu](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@avelicu](https://forums.plex.tv/u/avelicu)
#### Post date: [August 8, 2015, 4:15pm UTC](https://forums.plex.tv/t/call-binary-from-plex-plugin/110649/1 "2015-08-08T16:15:51Z")

</div>

Hi guys,

I’m trying to write a quick plugin which calls Periscope ([https://code.google.com/p/periscope/](https://code.google.com/p/periscope/)) to fetch subtitles for a file.  
I’ve noticed that the environment of the plugin seems to override my normal python env; calling the binary works, but it can’t find its dependencies ("File “/usr/local/bin/periscope”, line 4, in   
import pkg\_resources  
ImportError: No module named pkg\_resources  
"). Calling the exact same command from a normal shell works fine.

Is there anything I can do to work around this problem?

---

<div class="post-metadata">

### Author: ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)
#### Post date: [August 8, 2015, 4:26pm UTC](https://forums.plex.tv/t/call-binary-from-plex-plugin/110649/2 "2015-08-08T16:26:32Z")

</div>

Perhaps sys.path.append(’/path/to/search’) could help you out?

/T

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [January 8, 2020, 7:50pm UTC](https://forums.plex.tv/t/call-binary-from-plex-plugin/110649/3 "2020-01-08T19:50:31Z")

</div>


