Django Apache: Target WSGI Script Cannot Be Loaded as Python Module
You should add your project path (/home/sharan/myproject/proj_VivRx1
) to python-path
parameter of WSGIDaemonProcess
Apache directive.
Target WSGI script cannot be loaded as a python module and ImportError: No module named 'django'
I'm cleared the issue by folling link https://github.com/GrahamDumpleton/mod_wsgi/issues/378
Target WSGI script cannot be loaded as Python module + ImportError: No module named
Instead of:
WSGIDaemonProcess itemcatalog python-path=/var/www/itemcatalog:/var/www/itemcatalog/venv/lib/python2.7/site-packages
use:
WSGIDaemonProcess itemcatalog python-path=/var/www \
python-home=/var/www/itemcatalog/venv
The Python path must be the parent directory of the package, not the package directory itself.
Instead of using python-path
to setup virtual environment, use python-home
as explained in official documentation:
- http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
Related Topics
Finding the Consecutive Zeros in a Numpy Array
Installing Numpy with Pip on Windows 10 for Python 3.7
How to Break Up This Long Line in Python
Equivalent of Numpy.Argsort() in Basic Python
Send Data from a Textbox into Flask
Regular Expression Usage in Glob.Glob
How to Check That Multiple Keys Are in a Dict in a Single Pass
How to Convert a Python Datetime.Datetime to Excel Serial Date Number
Reduce Left and Right Margins in Matplotlib Plot
Multiple Ping Script in Python
Python: How to Send Mail with To, Cc and Bcc
Python Variables as Keys to Dict
Upgrade Python in a Virtualenv
How to Initialize Weights in Pytorch
Running Jupyter via Command Line on Windows
Manifest.In Ignored on "Python Setup.Py Install" - No Data Files Installed