From owner-freebsd-questions@FreeBSD.ORG Wed May 25 15:33:05 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9C6C1065670 for ; Wed, 25 May 2011 15:33:05 +0000 (UTC) (envelope-from modulok@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id A95938FC08 for ; Wed, 25 May 2011 15:33:05 +0000 (UTC) Received: by gwb15 with SMTP id 15so3973278gwb.13 for ; Wed, 25 May 2011 08:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Cy1pSyk8n/E5y+hW7zWMgtNpy0RxGc4FLyfvtWh0Lqo=; b=LmZc7gfUkWUDt6oEdmkuc7nukg36gfFv6KcW+sAKih0sftMXgKMpKOoM6SSTBcv9ud 1awjqt2CdEalUGfm9eGDBZCHiNvbfs1fEg/o5w9soub2yqqtDjcWVb8ghD6RiIK5clPz ERwVWbOVqnXWGLEOPV1NOyWjMMPQ7RvoT0SwY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ghWfjcNOGa6SG54j44gZqisGVid4lsH1zlZtlm8gTB0jPO29s2pO+0ROXIwoWOX0nN ZtuINfExwafUKWOOqGRhyKXgl6lTGQMV9fiVIKTKDqGbB5hV+23rmq0NcftYfLal32aM WCq1q2xzgaFGTLgB24QJNvcEFbW4OzBUeGDHE= MIME-Version: 1.0 Received: by 10.100.252.1 with SMTP id z1mr6079409anh.130.1306337584912; Wed, 25 May 2011 08:33:04 -0700 (PDT) Received: by 10.100.207.9 with HTTP; Wed, 25 May 2011 08:33:04 -0700 (PDT) In-Reply-To: References: Date: Wed, 25 May 2011 09:33:04 -0600 Message-ID: From: Modulok To: Patrick Brookings Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD Python version 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, 25 May 2011 15:33:06 -0000 On 5/24/11, Patrick Brookings wrote: > Hello, > > Can you please tell me what standard version of Python comes with the latest > FreeBSD? > And also, is it possible to upgrade to a newer version without breaking > other functionalities? > > I am asking because more and more scripts require at least Python 2.5, > whereas CentOS for example only comes with 2.4.3, and it's pretty much > impossible to upgrade the system Python without breaking yum and things like > that. You can install any version you want. Nothing in the FreeBSD base system requires python. In fact, I have multiple versions installed on FreeBSD right now. I'm running python 2.6, 2.7 and 3.2. In your hash bang line, just specify the version that a specific script should run as. Something like: #!/usr/bin/env python2.6 '''I'll use python 2.6''' #!/usr/bin/env python2.7 '''I'll use python 2.7''' #!/usr/bin/env python3.2 '''I'll use python 3.2''' #!/usr/bin/env python '''I'll use whatever version `which python` returns.''' -Modulok-