> On 16 Nov 2017, at 8:51 am, Travis Perkins <[email protected]> wrote:
>
> So I have been working on getting Reposado and Margarita up and running in my
> environment following the listed instructions here:
> https://clburlison.com/reposado-guide/
>
> I've adjusted what I have needed to for the variations (Ubuntu to Redhat,
> Apache 2.4 to Apache 2.2, etc)
>
> For the mod_wsgi install, I used the instructions listed here:
> http://modwsgi.readthedocs.io/en/develop/user-guides/quick-installation-guide.html
>
> Currently when I start apache, and try to access the margarita site that is
> using the .wsgi script I get the following:
>
> mod_wsgi (pid=19248, process='margarita', application=''): Loading WSGI
> script '/usr/local/asus/margarita/margarita.wsgi'.
> mod_wsgi (pid=19248): Target WSGI script
> '/usr/local/asus/margarita/margarita.wsgi' cannot be loaded as Python module.
> mod_wsgi (pid=19248): Exception occurred processing WSGI script
> '/usr/local/asus/margarita/margarita.wsgi'.
> Traceback (most recent call last):
> File "/usr/local/asus/margarita/margarita.wsgi", line 8, in <module>
> from margarita import app as application
> File "/usr/local/asus/margarita/margarita.py", line 2, in <module>
> from flask import Flask
> ] ImportError: No module named flask
>
>
> Yet when I list out the modules for python I have flask listed.
What do you get when you do:
$ python
Python 2.7.10 (default, Feb 7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.prefix
'/System/Library/Frameworks/Python.framework/Versions/2.7'
>>> sys.version
'2.7.10 (default, Feb 7 2017, 00:08:15) \n[GCC 4.2.1 Compatible Apple LLVM
8.0.0 (clang-800.0.34)]'
You are setting WSGIPythonHome wrong as it shouldn't be a python binary, but
the same as sys.prefix for a Python virtual environment if using one. Don't set
WSGIPythonHome at all it using system Python.
More details on virtual environments can be found in:
http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
<http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html>
You also don't need:
WSGIRestrictStdout Off
It isn't restricted by default.
>
> I have set my wsgi.conf file to contain the following based on what I have
> read:
>
> LoadModule wsgi_module modules/mod_wsgi.so
> WSGISocketPrefix /var/run/wsgi
> WSGIRestrictStdout Off
> WSGIPythonHome /usr/bin/python2.6
>
> Any insight or help would be much appreciated.
>
>
>
> -Travis
>
>
> --
> 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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> 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 [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.