Search code examples
pythonpython-imaging-librarymaya

Python PIL missing import and DLL problems


When trying to install pillow to manage images in python I'm getting problems.

First Maya didn't recognice I had PIL installed, kinda solved it copy pasting the PIL folder from C:\Python27\Lib\site-packages into C:\Program Files\Autodesk\Maya2018\Python\Lib\site-packages. This makes Maya see it, but only can import PIL and doesn't recognize anything more. When trying to do it as it's explained in other issues (from PIL import Image) Maya tells me that there is a problem with the DLL. DLL missing

I tried reinstalling pillow, reinstalling Maya, trying other versions... but to no avail. And cmd doesn't give problems with it. Install

Has someone stumbled with the same problem?


Solution

  • Likely it's because Maya python is compiled with another version of Visual Studio than standard python.

    Check this Changing python installation for maya there link to python modules compiled with Visual Studio 2010. You probably need Pillow package instead of PIL. Pillow is modern replacement for obsolete PIL package.