everyone. I home some problem. I have django project. The project use django-imagekit. If I run app with help command: python3 manage.py runserver - all works! BUT! If I use mod_wsgi I get it:
root@twingo:/home/evgen/twingo/build/env/lib/python3.4/site-packages# tail /var/log/apache2/error.log
[Fri Jun 19 21:13:25.268235 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] from .registry import register
[Fri Jun 19 21:13:25.268259 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] File "/home/evgen/twingo/build/env/lib/python3.4/site-packages/imagekit/registry.py", line 3, in <module>
[Fri Jun 19 21:13:25.268388 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] from .utils import autodiscover, call_strategy_method
[Fri Jun 19 21:13:25.268414 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] File "/home/evgen/twingo/build/env/lib/python3.4/site-packages/imagekit/utils.py", line 14, in <module>
[Fri Jun 19 21:13:25.268550 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] from pilkit.utils import *
[Fri Jun 19 21:13:25.268574 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] File "/home/evgen/twingo/build/env/lib/python3.4/site-packages/pilkit/utils.py", line 6, in <module>
[Fri Jun 19 21:13:25.268752 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] from .lib import Image, ImageFile, StringIO, string_types
[Fri Jun 19 21:13:25.268778 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] File "/home/evgen/twingo/build/env/lib/python3.4/site-packages/pilkit/lib.py", line 19, in <module>
[Fri Jun 19 21:13:25.268859 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] raise ImportError('PILKit was unable to import the Python Imaging Library. Please confirm it`s installed and available on your current Python path.')
[Fri Jun 19 21:13:25.268898 2015] [wsgi:error] [pid 20907] [remote 91.238.231.242:65535] ImportError: PILKit was unable to import the Python Imaging Library. Please confirm it`s installed and available on your current Python path.
root@twingo:/home/evgen/twingo/build/env/lib/python3.4/site-packages#
Here my apache config:
<VirtualHost *:80>
WSGIDaemonProcess twingo python-path=/home/evgen/twingo/build/:/home/evgen/twingo/build/env/lib/python3.4/site-packages/
WSGIProcessGroup twingo
WSGIScriptAlias / /home/evgen/twingo/build/wsgi.py
Alias /robots.txt /home/evgen/twingo/build/robots.txt
Alias /favicon.ico /home/evgen/twingo/build/static/images/favicon.ico
Alias /media/ /home/evgen/twingo/build/media/
Alias /static/ /home/evgen/twingo/build/static/
<Directory /home/evgen/twingo/build/static>
Require all granted
</Directory>
<Directory /home/evgen/twingo/build/media>
Require all granted
</Directory>
<Directory /home/evgen/twingo/build/>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Here listing project dir:
root@twingo:/home/evgen/twingo/build# ls
authapp env feedback manage.py service static templates travels twingo users wsgi.py
Here listing site-packages dir:
root@twingo:/home/evgen/twingo/build/env/lib/python3.4/site-packages# ls
Django-1.8.2.dist-info django_appconf-1.0.1.dist-info password_reset six-1.9.0.dist-info
PIL django_compress-1.0.1-py3.4.egg-info pilkit six.py
Pillow-2.8.2-py3.4.egg-info django_imagekit-3.2.6-py3.4.egg-info pilkit-1.1.12-py3.4.egg-info tests
__pycache__ django_password_reset-0.7.dist-info pip utils
_markerlib easy_install.py pip-1.5.6.dist-info utils-0.8.0-py3.4.egg-info
appconf image pkg_resources
compress image-1.4.0-py3.4.egg-info setuptools
django imagekit setuptools-17.0.dist-info
What I do wrong?
I solved this issue by installing Pillow