[PYTHON] Django / Apache / mod_wsgi: No module named importlib

My memo.

pip install according to the word importlib is missing

$ sudo pip install importlib
Requirement already satisfied (use --upgrade to upgrade): importlib in /usr/local/lib/python2.7/site-packages
Cleaning up...

It is said that there is. I found some information while wandering on stackoverflow. Apparently, it seems to be an error that appears when site-packages is not included in python-path. It just didn't pass ...

So edit virtualhost-example.com.conf.

<VirtualHost *:80≶
 Pass the path to # site-packages and wsgi.py
    WSGIDaemonProcess example.com python-path=/your/python/site-packages:/home/user/example.com
</VirtualHost≶
$ sudo apachectl graceful

It works safely.

Recommended Posts

Django / Apache / mod_wsgi: No module named importlib
Django --Apache mod_wsgi virtualhost deployment
Resolve No module named tkinter
'lambda_function': No module named When'selenium' appears
Django, nginx, uWSGI, virtualenv ImportError: No module named site Solution Note
When lambda-uploader says No module named xxxx.
Suddenly with Python PyInstaller No module named pyinstaller
Today's python error: ModuleNotFoundError: No module named
Django + Apache with mod_wsgi on Windows Server 2016
CentOS8 + Apache2.4 + pyenv + mod_wsgi + Django project deployment
CentOS 6.4 with Python 2.7.3 with Apache with mod_wsgi and Django
ModuleNotFoundError: No module named'***' when running Flask
ModuleNotFoundError in Python: No module named story
Run django applications on Windows + Apache + mod_wsgi + services.
python> import seiral> ImportError: No module named serial
What to do if "amazon-linux-extras" → "No module named amazon_linux_extras"
No module named What to do if you get'libs.resources'
Publish your Django app on Amazon Linux + Apache + mod_wsgi
ModuleNotFoundError: No module named'py4j'
ModuleNotFoundError: No module named'flask_sqlalchemy'
After installing pygame with conda install No module named font