You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS X 10.13.6 (17G65)
Python 3.6.4 installed in a pyenv
Having issues loading libpython3.6m.a trying to connect it to an either the system Apache or a Homebrew Apache running on port 80.
I have tried both the default system Apache and also tried using homebrew Apache. But neither work. It seems unable to load the libpython3.6m.a file into Apache.
$ pip install mod_wsgi
$ mod_wsgi-express module-config
LoadFile "/Users/myuser/.pyenv/versions/3.6.4/lib/libpython3.6m.a"
LoadModule wsgi_module "/Users/myuser/.pyenv/versions/3.6.4/envs/myprojectenv/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-darwin.so"
WSGIPythonHome "/Users/myuser/.pyenv/versions/3.6.4/envs/myprojectenv"
... update the apache config ...
$ apachectl configtest
httpd: Syntax error on line 537 of /usr/local/etc/httpd/httpd.conf: Syntax error on line 1 of /usr/local/etc/httpd/conf.d/wsgi.conf: Cannot load /Users/myuser/.pyenv/versions/3.6.4/lib/libpython3.6m.a into server: dlopen(/Users/myuser/.pyenv/versions/3.6.4/lib/libpython3.6m.a, 10): no suitable image found. Did find:\n\t/Users/myuser/.pyenv/versions/3.6.4/lib/libpython3.6m.a: unknown file type, first eight bytes: 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A\n\t/Users/myuser/.pyenv/versions/3.6.4/lib/libpython3.6m.a: unknown file type, first eight bytes: 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A
The text was updated successfully, but these errors were encountered:
Updated comment for someone else (probably future me) looking for answers... So for OSX / pyenv, if the output from the module-config looks like a "libpython3.6m.a" (*.a file) then it is a Python configuration issue and you will need to reinstall Python with shared library support. Do the following:
OS X 10.13.6 (17G65)
Python 3.6.4 installed in a pyenv
Having issues loading libpython3.6m.a trying to connect it to an either the system Apache or a Homebrew Apache running on port 80.
I have tried both the default system Apache and also tried using homebrew Apache. But neither work. It seems unable to load the libpython3.6m.a file into Apache.
The text was updated successfully, but these errors were encountered: