From owner-freebsd-questions@FreeBSD.ORG Wed Jun 14 17:10:16 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05BB416A52F for ; Wed, 14 Jun 2006 17:10:15 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out3.blueyonder.co.uk (smtp-out3.blueyonder.co.uk [195.188.213.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB4D843D46 for ; Wed, 14 Jun 2006 17:10:11 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [172.23.170.140] (helo=anti-virus02-07) by smtp-out3.blueyonder.co.uk with smtp (Exim 4.52) id 1FqYsa-0008MD-Ji; Wed, 14 Jun 2006 18:10:08 +0100 Received: from [82.41.32.90] (helo=[192.168.0.2]) by asmtp-out2.blueyonder.co.uk with esmtp (Exim 4.52) id 1FqYsa-0006td-1O; Wed, 14 Jun 2006 18:10:08 +0100 Message-ID: <449042EF.9040905@dial.pipex.com> Date: Wed, 14 Jun 2006 18:10:07 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.13) Gecko/20060515 X-Accept-Language: en MIME-Version: 1.0 To: Joe Auty References: <9842C36E-C450-4282-9019-BA2DD3476684@netmusician.org> <2A55FF5E-F764-406A-BE0E-272246F425B5@netmusician.org> <448xoska3k.fsf@be-well.ilk.org> <44733B8B.6030404@dial.pipex.com> <448FDE6B.4000703@dial.pipex.com> <38D0516F-2F6B-4700-9006-5A2D6034DC0C@netmusician.org> In-Reply-To: <38D0516F-2F6B-4700-9006-5A2D6034DC0C@netmusician.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: Python port problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2006 17:10:16 -0000 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 >>> Could not find platform dependent libraries >>> Consider setting $PYTHONHOME to [:] >>> '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