# Problem importing Pillow and numpy modules

**URL:** <https://forums.plex.tv/t/problem-importing-pillow-and-numpy-modules/124305>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [November 21, 2015, 6:08pm UTC](https://forums.plex.tv/t/problem-importing-pillow-and-numpy-modules/124305 "2015-11-21T18:08:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ledge74](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ledge74/32/2893_2.png) [@ledge74](https://forums.plex.tv/u/ledge74)\
**Post date:** [November 21, 2015, 6:08pm UTC](https://forums.plex.tv/t/problem-importing-pillow-and-numpy-modules/124305/1 "2015-11-21T18:08:10Z")

</div>

Hey guys,

I am trying to import pillow and numpy modules into my channel (to do some image processing), but it does not work I get the following issue:

`CRITICAL (core:613) - Exception starting plug-in (most recent call last): File "bundles-release/Framework.bundle-dist/Contents/Resources/Versions/2/Python/Framework/core.py", line 606, in start File "bundles-release/Framework.bundle-dist/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 256, in execute File "/Users/MCSanchez/Library/Application Support/Plex Media Server/Plug-ins/HelloHue.bundle/Contents/Code/ __init__.py", line 20, in <module> from PIL import Image, ImageStat File "bundles-release/Framework.bundle-dist/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 345, in __import__ ImportError: dlopen(/Users/MCSanchez/Library/Application Support/Plex Media Server/Plug-ins/HelloHue.bundle/Contents/Libraries/Shared/PIL/_imaging.so, 2): Symbol not found: _PyUnicodeUCS2_AsLatin1String Referenced from: /Users/MCSanchez/Library/Application Support/Plex Media Server/Plug-ins/HelloHue.bundle/Contents/Libraries/Shared/PIL/_imaging.so Expected in: flat namespace in /Users/MCSanchez/Library/Application Support/Plex Media Server/Plug-ins/HelloHue.bundle/Contents/Libraries/Shared/PIL/_imaging.so`

Any idea on what is wrong with the modules?

Thanks!

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [November 23, 2015, 3:25am UTC](https://forums.plex.tv/t/problem-importing-pillow-and-numpy-modules/124305/2 "2015-11-23T03:25:18Z")

</div>

If you haven’t already done so, you could try setting the elevated code policy flag in the info.plist.

```auto
<key>PlexPluginCodePolicy</key>
<string>Elevated</string>

```

---

<div class="post-metadata">

**Author:** ![ledge74](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ledge74/32/2893_2.png) [@ledge74](https://forums.plex.tv/u/ledge74)\
**Post date:** [November 23, 2015, 12:51pm UTC](https://forums.plex.tv/t/problem-importing-pillow-and-numpy-modules/124305/3 "2015-11-23T12:51:18Z")

</div>

I have already put this setting, doesn’t work 😕

---

<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:53pm UTC](https://forums.plex.tv/t/problem-importing-pillow-and-numpy-modules/124305/4 "2020-01-08T19:53:03Z")

</div>


