Python3.6 - cannot import name '_imaging' [Django 2.1.2, Apache 2, CentOS 7]
this is really a stupid mistake.
As I suggested in the question, the mod_wsgi I'm using is for python3.5.
Solved by uninstalling python35u-mod_wsgi and installing python36u-mod_wsgi.
I'm running my Django application with Apache on CentOS. I already (pip) installed Pillow on my virtualenv(python3.6). When I run python in shell, from PIL import _imaging doesn't generate any error. However, When I put this line of code inside the Django application, it generates an error: cannot import name '_imaging'. This is confusing.
I set the python path: /var/www/ProjectName/virtualenv/bin/python3.6/site-packages (in WSGIDaemonProcess), and the error occurred in the same location, so I think it's not an issue that Django is running on another python version.
Maybe is a mod_wsgi error? I installed mod_wsgi with yum install python35u-mod_wsgi
Can anyone help me with this issue? Thanks a lot.