Pillow / PIP not working in maya

Pillow / PIP not working in maya

Craig_Lamorte
Advocate Advocate
9,137 Views
22 Replies
Message 1 of 23

Pillow / PIP not working in maya

Craig_Lamorte
Advocate
Advocate

Hello,

 

I have done a pip install pillow already.  PIL resides in my python site-packages.  I can even run it just fine inside my text editor.  However when I add my code into a tool that is launched in maya 2017, i get an error "No Module named PIL"

 

I am doing -

from PIL import Image

 

Why does it not work inside of maya??

 

Thanks

Craig

0 Likes
Accepted solutions (1)
9,138 Views
22 Replies
Replies (22)
Message 21 of 23

Craig_Lamorte
Advocate
Advocate

So maya2022 is out and now that it supports python3 was going to make the switch.  Does maya still need a specially built Pillow for 2022 and python3?  I did a quick test of installing pillow for python3 and just running From PIL import image, and it did error out.  So I am assuming will have to have a new package built?

 

Thanks 

Craig

0 Likes
Message 22 of 23

Craig_Lamorte
Advocate
Advocate

Upgrading to 2022.  The custom built PIL package works still in 2022 if I force to python2.  But obviously it does not work if I go to python3.  I tried just doing a normal pip install of Pillow for python3 and that didn't work, so I am assuming it needs to be custom built for python3 ?  

0 Likes
Message 23 of 23

Craig_Lamorte
Advocate
Advocate

actually I think i may have gotten it to work.  Looks like for python 3 you do not need a custom build package.  I installed python 3.7 and pip installed pillow and just dropped the PIL folder into mayas python site-packages folder

0 Likes