Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2006 18:10:07 +0100
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        Joe Auty <joe@netmusician.org>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Python port problems
Message-ID:  <449042EF.9040905@dial.pipex.com>
In-Reply-To: <38D0516F-2F6B-4700-9006-5A2D6034DC0C@netmusician.org>
References:  <9842C36E-C450-4282-9019-BA2DD3476684@netmusician.org>	<fb6605670605221727h719579a2gdeae84452036f6e8@mail.gmail.com>	<2A55FF5E-F764-406A-BE0E-272246F425B5@netmusician.org>	<448xoska3k.fsf@be-well.ilk.org> <44733B8B.6030404@dial.pipex.com>	<B766BA83-CF9A-404C-B8AB-3F9BF4D7180C@netmusician.org>	<448FDE6B.4000703@dial.pipex.com> <38D0516F-2F6B-4700-9006-5A2D6034DC0C@netmusician.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Joe Auty wrote:

>
> On Jun 14, 2006, at 6:01 AM, Alex Zbyslaw wrote:
>
>> Joe Auty wrote:
>>
>>>
>>> Sorry for the delay in response here. This is still a problem for  
>>> me,  and I would still like this problem resolved.
>>>
>>> Yes, I've tried reinstalling both Python and Mailman, and upgraded  
>>> to  newer port revisions of Mailman which have been released since  
>>> this  message. I'm still getting the same error message when I go  
>>> to start  Mailman via its rc script:
>>>
>>> ... snip
>>> Traceback (most recent call last):
>>> :
>>> : No module named getopt  File "/usr/local/mailman/bin/qrunner",  
>>> line  76, in ?
>>>
>>>     ImportErrorimport getopt
>>> No module named getopt:
>>> No module named getopt
>>> ImportErrorCould not find platform independent libraries <prefix>
>>> Could not find platform dependent libraries <exec_prefix>
>>> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
>>> 'import site' failed; use -v for traceback
>>> : No module named getopt
>>> Traceback (most recent call last):
>>>   File "/usr/local/mailman/bin/qrunner", line 76, in ?
>>>     import getopt
>>> ImportError: No module named getopt
>>
>>
>> Honestly, this looks like a screwed python install or some screw up  
>> when mailman compiled.  Can you do a few basic info things?
>>
>
> Sure, happy to do so!

I've truncated the tests since nothing there showed any problem 
whatsoever.  I'm running out of ideas, so this one may be off the wall:
($ to indicate command lines but don;t type the $ :-))

$ egrep prefix /usr/local/mailman/bin/qrunner

I've found a mailman installation I can compare this next one against.

$ egrep prefix /usr/local/mailman/bin/paths.py

If this doesn't look like below, then we have found the problem, if not 
the cause.  If anything contains the <> you have the problem and can 
ignore the next item.  (Yours should have /usr/local for /var but it's a 
cruddy Linux machine which happens to have mailman).


# importing this module, sys.path gets `hacked' so that the $prefix/Mailman
prefix = '/var/mailman'
exec_prefix = '${prefix}'
if exec_prefix == '${prefix}':
    exec_prefix = prefix
# Hack the path to include the parent directory of the $prefix/Mailman 
package
sys.path.insert(0, prefix)
sys.path.insert(0, os.path.join(prefix, 'pythonlib'))
sitedir = os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3],


And one which may spew quite a lot.  Cut it off if it gets to printing help.

$ python -v /usr/local/mailman/bin/qrunner


--Alex





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?449042EF.9040905>