Actually this could just be it not even finding the Python framework. On older
MacOS X versions it wasn’t uncommon for third party Python installations to
screw things up so that it wasn’t actually possible to link to their framework
from a separate application.
All the LD_RUN_PATH is not used on MacOS X. That is Linux or Solaris.
I can’t remember how to you fix up the framework reference in mod_wsgi.so if it
is broken.
I don’t think you can simply set the environment variable:
DYLD_LIBRARY_PATH=/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib
when running mod_wsgi-express.
That doesn’t seem to be the correct directory for where the framework library
might be installed anyway.
What do you get for:
find /Applications/Canopy.app -name Python -print
Graham
> On 13 Apr 2016, at 8:34 PM, Graham Dumpleton <[email protected]>
> wrote:
>
> Are you really running MacOS X 10.6?
>
> This issue used to come up in old MacOS X versions.
>
> The problem is that one of Apache, mod_wsgi or the Python library doesn’t
> have a binary image in it for the required architecture. That is, 32 bit or
> 64 bit.
>
> What do you get when you run:
>
> file mod_wsgi-py27.so
>
> file /usr/sbin/httpd
>
> file
> /Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib/libpython2.7.so
>
> You may have to work out the correct path for each of these.
>
> There was some notes about related issue in really old documentation on old
> Google Code site about things like this.
>
> https://code.google.com/archive/p/modwsgi/wikis/InstallationOnMacOSX.wiki
> <https://code.google.com/archive/p/modwsgi/wikis/InstallationOnMacOSX.wiki>
>
> Graham
>
>> On 13 Apr 2016, at 8:25 PM, SGaffney <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hello,
>>
>> I'm struggling with installation of mod_wsgi-express in my Canopy
>> distribution. Compilation works fine (output from python setup.py install is
>> attached), but when I run `mod_wsgi-express start-server`, I get the error
>> "Library not loaded: @rpath/Python" (follows email).
>>
>> From related support posts, I see that setting the LD_RUN_PATH at
>> compilation is crucial, but the setup.py file seems to get mine right:
>> [from debugger inspection in setup.py before "# Now finally run distutils."]
>> >> LD_RUN_PATH
>> '/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib:/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/config'
>> >> PYTHON_LDFLAGS
>> ['-L/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib',
>>
>> '-L/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/config']
>> >> PYTHON_LDLIBS
>> ['-lpython2.7']
>>
>> And here's the output of ldd on the .so file:
>> > ldd mod_wsgi-py27.so
>> @rpath/Python (compatibility version 2.7.0, current version 2.7.0)
>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>> version 1226.10.1)
>>
>> I'd be very grateful for any suggestions.
>>
>> Thank you,
>>
>> Stephen
>>
>> -------
>>
>> $ mod_wsgi-express start-server
>> Server URL : http://localhost:8000/ <http://localhost:8000/>
>> Server Root : /tmp/mod_wsgi-localhost:8000:502
>> Server Conf : /tmp/mod_wsgi-localhost:8000:502/httpd.conf
>> Error Log File : /tmp/mod_wsgi-localhost:8000:502/error_log (warn)
>> Request Capacity : 5 (1 process * 5 threads)
>> Request Timeout : 60 (seconds)
>> Queue Backlog : 100 (connections)
>> Queue Timeout : 45 (seconds)
>> Server Capacity : 20 (event/worker), 20 (prefork)
>> Server Backlog : 500 (connections)
>> Locale Setting : en_GB.UTF-8
>> httpd (mod_wsgi-express) : Syntax error on line 151 of
>> /tmp/mod_wsgi-localhost:8000:502/httpd.conf: Cannot load
>> /Users/sgg/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/mod_wsgi-4.5.1-py2.7-macosx-10.6-x86_64.egg/mod_wsgi/server/mod_wsgi-py27.so
>> into server:
>> dlopen(/Users/sgg/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/mod_wsgi-4.5.1-py2.7-macosx-10.6-x86_64.egg/mod_wsgi/server/mod_wsgi-py27.so,
>> 10): Library not loaded: @rpath/Python\n Referenced from:
>> /Users/sgg/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/mod_wsgi-4.5.1-py2.7-macosx-10.6-x86_64.egg/mod_wsgi/server/mod_wsgi-py27.so\n
>> Reason: image not found
>>
>>
>> --
>> 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>.
>> <setup.py_install_output.txt>
>
--
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.