Thanks Graham, let me answer your questions .
I compiled mod_wsgi from source (from https://github.com/GrahamDumpleton/mod_wsgi/archive/4.6.5.tar.gz) My first try was without the python-path in the WSGIDaemonProcess directive. but the same error was there without python-path. I am not using a virtual environment. Here is my python environment : Python 3.7.1 (default, Jan 15 2019, 15:00:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', '/usr/local/lib/python3.7/lib-dynload', '/root/.local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/site-packages'] >>> sys.prefix '/usr/local' >>> is the path ok ? I have just tried your suggestion by adding the directive "WSGIRestrictEmbedded" outside the VirtualHost. But the same 500 error happens [Mon Jan 21 13:51:42.193801 2019] [wsgi:error] [pid 12113] [remote 10.222.160.228:54376] from sklearn.feature_extraction.text import TfidfVectorizer [Mon Jan 21 13:51:42.193829 2019] [wsgi:error] [pid 12113] [remote 10.222.160.228:54376] ModuleNotFoundError: No module named 'sklearn.feature_extraction' any idea ? Thanks Eric Le lundi 21 janvier 2019 12:28:07 UTC+1, Eric Demarqui a écrit : > > Hi > > I have an application using Flask server which is running fine. > > I want to use now Apache with mod_wsgi on this environment : Apache/2.4.6 > (Red Hat Enterprise Linux) mod_wsgi/4.6.5 Python/3.7 > > Here is how my wsgi.conf file looks like : > > <VirtualHost *> > ServerName xxxxxx > > WSGIDaemonProcess pythonapi user=apache group=apache processes=1 > threads=5 home=/var/www/html/pythonapi > python-path=/usr/local/lib/python3.7/site-packages > WSGIProcessGroup pythonapi > > WSGIScriptAlias /servicebotpy /var/www/html/pythonapi/servicebotpy.wsgi > > <Directory /var/www/html/pythonapi> > WSGIApplicationGroup %{GLOBAL} > Options Indexes MultiViews FollowSymlinks > AllowOverride None > Require all granted > </Directory> > </VirtualHost> > > mod_wsgi is compiled with same version as of python3.7 > > I am stucked here . > > [Mon Jan 21 10:32:45.881625 2019] [wsgi:error] [pid 22328] [remote > 10.222.160.228:49260] File "/var/www/html/pythonapi/scorer.py", line 5, > in <module> > [Mon Jan 21 10:32:45.881632 2019] [wsgi:error] [pid 22328] [remote > 10.222.160.228:49260] from sklearn.feature_extraction.text import > TfidfVectorizer > [Mon Jan 21 10:32:45.881656 2019] [wsgi:error] [pid 22328] [remote > 10.222.160.228:49260] ModuleNotFoundError: No module named > 'sklearn.feature_extraction' > > Thanks for help > Eric > > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
