Python3 & WSGI Module error

匿名 (未验证) 提交于 2019-12-03 01:39:01

问题:

<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:

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:



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!