Open ranajah opened 2 weeks ago
Where did you get your Python installation from? Python 3 should not be python
, but python3
. Are you sure you are using normal python3
from Homebrew?
our flask application is with python 2 unfortunately.
Does wsgi_module work with python2?
It isn't tested with Python 2.7 anymore, but may still work as no changes have been made yet that breaks Python 2.7 compatibility.
The error you are having is more to do with how your Python installation was built. That reference to "flat namespace" indicates it may have been built to use macOS library frameworks rather than more library library archives. The framework based builds of Python sometimes don't work properly for embedding.
What distro is that Python 2.X version from?
It is the python came with OSX Python 2.7.13 (default, Apr 4 2017, 08:47:57) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin Type "help", "copyright", "credits" or "license" for more information.
From memory, for the last macOS versions that supplied Python 2.7, that old cut down version of Python 2.7 Apple supplied did not work for embedded systems.
Is there a reason you cannot use the last Python 2.7 distribution from the Python Software Foundation.
I installed mod_wsgi on Mac system by
cd /Users/gringotts/Downloads/mod_wsgi ./configure --with-python=/usr/local/bin/python --with-apxs=/opt/homebrew/Cellar/httpd/2.4.59/bin/apxs make sudo make install
then I added LoadModule wsgi_module /opt/homebrew/lib/httpd/modules/mod_wsgi.so to the http.conf file sudo /opt/homebrew/bin/apachectl -k restart gives below error
httpd: Syntax error on line 183 of /opt/homebrew/etc/httpd/httpd.conf: Cannot load /opt/homebrew/lib/httpd/modules/mod_wsgi.so into server: dlopen(/opt/homebrew/lib/httpd/modules/mod_wsgi.so, 0x000A): symbol not found in flat namespace '_PyBool_Type'