From owner-freebsd-ports@FreeBSD.ORG Sat Jun 16 02:30:31 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6490D106566B for ; Sat, 16 Jun 2012 02:30:31 +0000 (UTC) (envelope-from fbsd@brightstar.bomgardner.net) Received: from brightstar.bomgardner.net (brightstar.bomgardner.net [63.229.207.48]) by mx1.freebsd.org (Postfix) with ESMTP id 3895A8FC0A for ; Sat, 16 Jun 2012 02:30:31 +0000 (UTC) Received: from brightstar.bomgardner.net (localhost [127.0.0.1]) by brightstar.bomgardner.net (Postfix) with ESMTP id C9B3D8CB for ; Fri, 15 Jun 2012 21:31:02 -0500 (CDT) From: "Gene" To: FreeBsd-ports Date: Fri, 15 Jun 2012 21:31:02 -0500 Message-Id: <20120616022223.M1362@brightstar.bomgardner.net> In-Reply-To: References: <20120614234727.M12036@brightstar.bomgardner.net> X-Mailer: OpenWebMail 2.53 X-OriginatingIP: 192.168.0.2 (fbsd) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Subject: Re: mail/mailman install problem python 2.6 import urandom X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jun 2012 02:30:31 -0000 The problem is with 2.6. 2.7 performs the below just fine. 2.6 does not, The mailman port seems to insist on 2.6 no matter what I do. brightstar# uname -srm FreeBSD 8.1-RELEASE-p2 amd64 brightstar# python2.6 --version Python 2.6.7 brightstar# python2.6 -c 'from os import urandom as _urandom; print str (_urandom)' Traceback (most recent call last): File "", line 1, in ImportError: cannot import name urandom dir(os) list no "urandom" Is there supposed to be a urandom in 2.6? Gene On Fri, 15 Jun 2012 17:35:59 +0200, Daniel Nebdal wrote > That's slightly bizarre - urandom should be in the os module. Just > to verify: > > mr16613: > uname -srm > FreeBSD 9.0-STABLE amd64 > mr16613: > python2.7 --version > Python 2.7.3 > mr16613: > python2.7 -c 'from os import urandom as _urandom ; print > str(_urandom)' > > > Out of curiosity, could you try something in python? > Start python2.7 , and enter > import os > dir(os) > > That ought to display a long list of things in the os module, > including urandom. > > On Fri, Jun 15, 2012 at 1:50 AM, Gene > wrote: > > Hi All: > > > >  Running 8.1 AMD64. I had python 2.6.8 installed. After upgrading several > >  ports, which installed python 2.7.3_2, scripts requiring 2.6 fail due to an > >  inability to import urandom from os. > > > >  Now I'm not a python person by any means, but I was wondering where its > >  trying to find urandom. Could it be looking for 'dev/urandom'? Or perhaps > >  urandom from ports/math/mpc? > > > >  In a few scripts I've changed 2.6 to 2.7 and they seem to work. Did > >  installing 2.7 alongside 2.6 break something? > > > >  Specifically, right now I'm trying to install mail/mailman port which looks > >  for python 2.6. It terminates with the following: > > > >  ================================================ > >  Compiling /usr/local/mailman/Mailman/versions.py ... > >  Traceback (most recent call last): > >  File "bin/update", line 50, in > >    from Mailman import Utils > >  File "/usr/local/mailman/Mailman/Utils.py", line 32, in > >    import cgi > >  File "/usr/local/lib/python2.6/cgi.py", line 49, in > >    import mimetools > >  File "/usr/local/lib/python2.6/mimetools.py", line 6, in > >    import tempfile > >  File "/usr/local/lib/python2.6/tempfile.py", line 34, in > >    from random import Random as _Random > >  File "/usr/local/lib/python2.6/random.py", line 47, in > >    from os import urandom as _urandom > >  ImportError: cannot import name urandom > >  ================================================= > > > >  I've googled and searched archives and all I can find is ubuntu problems > >  related to a virtual machine. > > > >  Does anyone know what's going on? > > > >  Thanks, > >  Gene > > > > -- > > > > _______________________________________________ > > freebsd-ports@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" --