Surprisingly, there was nothing in this area, so make a note. By default on Mac Python 2.7.9 Is installed.
pyenv manages the Python environment. It is possible to switch and manage different versions of Python.
For Mac, install with brew.
$ brew install pyenv-virtualenv
Install 3.4.3.
$ pyenv install 3.4.3
Set 3.4.3 globally.
$ pyenv global 3.4.3
Check if it is set globally
$ python -V
mod_wsgi mod_wsgi is a module for running Python on Apache.
$ brew install mod_wsgi
Add the following to httpd.conf.
LoadModule wsgi_module [module to path]
See below for setting to virtualhost. http://django-project-skeleton.readthedocs.org/en/latest/apache2_vhost.html
Daemon Mode wsgi_mod defaults to "Embedded Mode". In "Embedded Mode", the python file is not updated unless Apache is restarted. To reflect the python modification immediately, set it to "Daemon Mode". Put "processes = 2 threads = 15 display-name =% {GROUP}" in "WSGI Daemon Process".
WSGIDaemonProcess example.com processes=2 threads=15 display-name=%{GROUP}
[reference] https://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegation_To_Daemon_Process
Recommended Posts