You cannot point mod_wsgi compiled for Python 2.7 at a Python 3.6 virtual environment. This is explained in the documentation on virtual environments.
http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html <http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html> You will need to uninstall the system package for mod_wsgi and compiled mod_wsgi yourself from source code against Python 3.6 and use it. The easiest way to do that is to use the 'pip install mod_wsgi' method described in: https://pypi.python.org/pypi/mod_wsgi <https://pypi.python.org/pypi/mod_wsgi> Once installed, use 'mod_wsgi-express start-server' if using to use it for development from the command line. To integrate into system Apache for permanent solution, run ``mod_wsgi-express module-config`` to get the configuration to include into Apache to load your compiled mod_wsgi module. Then configure Apache as per normal. Ensure you read write through the PyPi doc page for mod_wsgi as it explains more about manual integration using 'pip install' version. Graham > On 16 Apr 2018, at 10:32 pm, nitzan.cohen via modwsgi > <email@example.com> wrote: > > Hey, > I have an ubuntu server with apache that I would like to run my Flask app on > (python3.6). > I have installed mod_wsgi and enabled it: > sudo apt-get install libapache2-mod-wsgi > sudo a2enmod wsgi > > > I have a file in my project "runtime.txt" that has inside "python-3.6.3" > When I try to surf to the site, I get "Internal Server Error" and that's > because my project could only run with python versions 3.6+ (it has type > hinting). > > When looking in the apache logs, I see that it runs python2.7 > mod_wsgi: Compiled for Python/2.7.11. > mod_wsgi: Runtime using Python/2.7.12. > > Thanks, > Nitzan > > -- > 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 modwsgi+unsubscr...@googlegroups.com > <mailto:modwsgi+unsubscr...@googlegroups.com>. > To post to this group, send email to firstname.lastname@example.org > <mailto:email@example.com>. > Visit this group at https://groups.google.com/group/modwsgi > <https://groups.google.com/group/modwsgi>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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 modwsgi+unsubscr...@googlegroups.com. To post to this group, send email to firstname.lastname@example.org. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.