And I found this useful hint.
http://modpython.org/pipermail/mod_python/2004-November/016815.html
https://groups.google.com/forum/#!topic/comp.lang.python/zqm-uvhfzHY
And indeed:
# python
Python 2.7.13 (default, Mar 25 2017, 16:20:16)
[GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032
)] on freebsd10
Type "help", "copyright", "credits" or "license" for more information.
>>> import mod_python.apache
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/mod_python/apache.py", line
30, in <module>
import _apache
ImportError: No module named _apache
And
[Sat Apr 01 08:59:34.694122 2017] [:notice] [pid 75658:tid 34401707008]
mod_python: Creating 8 session mutexes based on 7 max processes and 25 max
threads.
[Sat Apr 01 08:59:34.694155 2017] [:notice] [pid 75658:tid 34401707008]
mod_python: using mutex_directory /tmp
[Sat Apr 01 08:59:34.865517 2017] [mpm_worker:notice] [pid 75658:tid
34401707008] AH00292: Apache/2.4.25 (FreeBSD) OpenSSL/1.0.2k mod_python/3.5.
0 Python/2.7.13 PHP/5.6.30 configured -- resuming normal operations
[Sat Apr 01 08:59:34.865568 2017] [core:notice] [pid 75658:tid 34401707008]
AH00094: Command line: '/usr/local/sbin/httpd'
[Sat Apr 01 08:59:40.077629 2017] [:error] [pid 46654:tid 34745705472]
make_obcallback: could not import mod_python.apache.\n
ImportError: No module named mod_python.apache
[Sat Apr 01 08:59:40.078052 2017] [:error] [pid 46654:tid 34745705472]
make_obcallback: Python path being used "['/usr/local/lib/python27.zip',
'/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-freebsd10',
'/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old',
'/usr/local/lib/python2.7/lib-dynload']".
[Sat Apr 01 08:59:40.078087 2017] [:error] [pid 46654:tid 34745705472]
get_interpreter: no interpreter callback found.
On Saturday, April 1, 2017 at 6:57:04 PM UTC+3, David Gessel wrote:
>
> Also, given your helpful hint (thanks) I tracked down this :
> https://code.activestate.com/lists/python-tutor/23472/
>
> however, adding the paths to site.py didn't help. There are two further
> hints, but I'm not sure where to apply them - adding the paths to the Trac
> code or creating *.pth files (as suggested in site.py) but it isn't clear
> where to install them or if they'll only enumerate subdirectories of an
> existing path directory (sort of implied).
>
> On Saturday, April 1, 2017 at 6:21:34 PM UTC+3, David Gessel wrote:
>>
>> I apologize for the late response, but tested and yes, same error.
>> Commented out, apachectl graceful and
>> [Sat Apr 01 08:19:28.674481 2017] [core:notice] [pid 75658:tid
>> 34401707008] AH00094: Command line: '/usr/local/sbin/httpd'
>> [Sat Apr 01 08:20:28.444978 2017] [:error] [pid 45481:tid 34741511168]
>> make_obcallback: could not import mod_python.apache.\n
>> ImportError: No module named mod_python.apache
>> [Sat Apr 01 08:20:28.445426 2017] [:error] [pid 45481:tid 34741511168]
>> make_obcallback: Python path being used "['/usr/local/lib/python27.zip',
>> '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-freebsd10',
>> '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old',
>> '/usr/local/lib/python2.7/lib-dynload']".
>> [Sat Apr 01 08:20:28.445464 2017] [:error] [pid 45481:tid 34741511168]
>> get_interpreter: no interpreter callback found.
>>
>>
>>
>> On Monday, March 27, 2017 at 12:42:59 AM UTC+3, RjOllos wrote:
>>>
>>>
>>>
>>> On Saturday, March 25, 2017 at 9:52:30 AM UTC-7, David Gessel wrote:
>>>>
>>>> Thanks! I tried and
>>>> # apachectl graceful
>>>>
>>>> but no change, though the error log might provide a clue with respect
>>>> to what paths are still getting called (no change):
>>>>
>>>> Enter code here.Sat Mar 25 09:50:25.025855 2017] [:error] [pid 69623:tid
>>>> 34741511168] make_obcallback: could not import mod_python.apache.\n
>>>> ImportError: No module named mod_python.apache
>>>> [Sat Mar 25 09:50:25.026263 2017] [:error] [pid 69623:tid 34741511168]
>>>> make_obcallback: Python path being used "['/usr/local/lib/python27.zip',
>>>> '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-freebsd10',
>>>> '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old',
>>>> '/usr/local/lib/python2.7/lib-dynload']".
>>>> [Sat Mar 25 09:50:25.026292 2017] [:error] [pid 69623:tid 34741511168]
>>>> get_interpreter: no interpreter callback found.
>>>> ..
>>>>
>>>
>>>
>>> It seems that your PythonPath directive is having no effect. Do you get
>>> the same "Python path being used" error if you comment out the PythonPath
>>> directive?
>>>
>>> With regard to testing, (1) shows how to setup a simple test case using
>>> modpython.test_handler.
>>>
>>> - Ryan
>>>
>>> (1) https://trac.edgewall.org/wiki/TracModPython#Simpleconfiguration
>>>
>>
--
You received this message because you are subscribed to the Google Groups "Trac
Users" 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/trac-users.
For more options, visit https://groups.google.com/d/optout.