Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Pillow / PIP not working in maya

Pillow / PIP not working in maya

Craig_Lamorte
Advocate Advocate
9,377 Views
23 Replies
Message 1 of 24

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,378 Views
23 Replies
Replies (23)
Message 21 of 24

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 24

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 24

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
Message 24 of 24

LUCYSHAN1108
Community Visitor
Community Visitor

Hello Li,
I was wondering how do i suppose to use those files to get pil working for my python script targets to Maya 2018?
Thank you so much!

Best,
Yujia

0 Likes