I am trying to deploy Django Inventory with Apache + Mod_wsgi in Virtual environment. But It gives 500 server side error claiming that it cannot import PIL. But PIL and Photologue are already installed within my virtualenv. And I had no problem getting a hello-world project running within this setup.
FYI: Django Inventory itself installs as an app when installed with pip. And resides in the site-packages of the virtual-environment. But I have copied it fro the ste packages and put it in the /var/www/html root to serve from apache. Could this be a reason?
Thanks in advance.
[Tue Jun 21 10:50:24.308075 2016] [wsgi:error] [pid 19197] [remote ::1:224] File "/var/www/html/imsenv/lib/python2.7/site-packages/django_inventory/apps/photos/models.py", line 6, in <module>
[Tue Jun 21 10:50:24.308099 2016] [wsgi:error] [pid 19197] [remote ::1:224] from photologue.models import ImageModel
[Tue Jun 21 10:50:24.308108 2016] [wsgi:error] [pid 19197] [remote ::1:224] File "/var/www/html/imsenv/lib/python2.7/site-packages/photologue/models.py", line 33, in <module>
[Tue Jun 21 10:50:24.308131 2016] [wsgi:error] [pid 19197] [remote ::1:224] raise ImportError('Photologue was unable to import the Python Imaging Library. Please confirm it`s installed and available on your current Python path.')
[Tue Jun 21 10:50:24.308170 2016] [wsgi:error] [pid 19197] [remote ::1:224] ImportError: Photologue was unable to import the Python Imaging Library. Please confirm it`s installed and available on your current Python path.
This is probably not the answer that you're looking for, but...
Django-photologue 2.3 is a really old version - about 6 years old.
Installing PIL was often troublesome; I am the maintainer of Django-photologue since 2012, and I've had to write some ugly code in order to import PIL correctly (the installation path tended to change from installation to installation). I think it was in version 2.6 that I made these changes.
Nowadays everyone just uses Pillow instead :-)
By the way, I looked at the requirements file for django-inventory and it uses very old 3rd party software. For example, Django 1.6 - which is no longer supported.