问题
<VirtualHost *:80>
ServerName superhost.gr
ServerAdmin nikos@superhost.gr
WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
WSGIScriptAlias / /home/nikos/public_html/webapp.py
ProxyPass / http://superhost.gr:5000/
ProxyPassReverse / http://superhost:5000/
<Directory /home/nikos/public_html>
WSGIProcessGroup public_html
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
AddHandler wsgi-script .wsgi .py
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
Any ideas as to why iam getting the above error although i have python36 isntalled along with all modules? why can it find it?
回答1:
Most likely because your mod_wsgi isn't compiled for Python 3.6, or you have installed modules in a virtual environment but haven't told mod_wsgi where that virtual environment is.
For the first issue do the check in:
- http://modwsgi.readthedocs.io/en/develop/user-guides/checking-your-installation.html#python-installation-in-use
Note you can't force mod_wsgi compiled for one Python version to use another Python versions' installation or virtual environment.
For the second, see:
- http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
来源:https://stackoverflow.com/questions/50588933/python3-wsgi-module-error