'The _imagingft C module is not installed' when called by CUPS (_lp or root)

OSX: 10.10.5<br>
Python: 2.7<br>
pip freeze: PIL==1.1.7, Pillow==2.0.0<br>
brew list: freetype<br>

I have a Python script running as a CUPS backend in /usr/libexec/cups/backend. It runs fine when I call it as a user or root from a terminal prompt...but comes up with an error when CUPS calls it via the printer.

ERROR
The _imagingft C module is not installed

Open in new window

Again, this error does not happen when running it from a terminal prompt as either root or a user.

I have tried having cups run it as both _lp, and as root by changing the permissions on the backend file to 755 and 750 respectively. Watching a 'ps' confirms that when 755 it runs as _lp (user 26) and when set to 750 it runs as root (user 0).

Freetype, libjpg, PILlow, etc. all apear to be installed correctly via either pip or homebrew.

I'm at a loss.

1. What am I missing.
2. Is there a way to change the user when it runs from CUPS (although, again, when I run it as root from a terminal prompt, it runs fine).
3. Path'ing issue? Where would I correct this for CUPS?

Thanks.

I have also tried...
brew unlink freetype && brew link --overwrite freetype

Open in new window

To no effect.
LVL 3
Mike R.Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike R.Author Commented:
Found the answer...I needed to use-wheel when installing Pillow

pip install --upgrade pip
pip install wheel
pip uninstall Pillow
pip install --use-wheel Pillow
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Mac OS X

From novice to tech pro — start learning today.