AH01215: ImportError: No module named PIL: - python script unable to recognize PIL when running from apache2 config

Terry Reedy tjreedy at udel.edu
Tue Mar 28 15:47:37 EDT 2017


On 3/28/2017 11:59 AM, vishnuprasadh at gmail.com wrote:

> I capture following error in apache logs.
> AH01215: from PIL import Image: /var/www/images/index.py
> AH01215: ImportError: No module named PIL: /var/www/images/index.py

A general response to this particular message is
a) check spelling in code matches actual filename
b) check search path "import sys; print(sys.path)"
and then see if the path contains the directory actually containing the 
module

For this specific case, follow Chris's advice.


-- 
Terry Jan Reedy



More information about the Python-list mailing list