Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python,': 0.02; '16,': 0.03; 'source,': 0.04; 'subject:Python': 0.06; 'versions.': 0.07; 'considered,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '2.7': 0.14; '"python",': 0.16; 'after,': 0.16; 'enough.': 0.16; 'fiddle': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mercurial,': 0.16; 'subject:install': 0.16; 'subject:versions': 0.16; 'sudo': 0.16; 'tweak': 0.16; 'version?': 0.16; 'wow,': 0.16; 'x86_64': 0.16; 'wrote:': 0.18; '(not': 0.18; 'trying': 0.19; "python's": 0.19; 'thu,': 0.19; 'version.': 0.19; 'cc:addr:python.org': 0.22; 'install': 0.23; "aren't": 0.24; 'instance,': 0.24; 'fairly': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'chris': 0.29; 'start,': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'getting': 0.31; 'usually': 0.31; 'minor': 0.31; 'subject:what': 0.31; 'option': 0.32; 'run': 0.32; 'another': 0.32; 'subject:the': 0.34; 'could': 0.34; 'beyond': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'version': 0.36; 'really': 0.36; '2.6': 0.36; 'installing': 0.36; 'method': 0.36; 'useful': 0.36; 'thanks': 0.36; 'subject:?': 0.36; 'should': 0.36; 'easily': 0.37; 'system,': 0.38; 'server': 0.38; 'easiest': 0.38; 'pm,': 0.38; 'though,': 0.39; 'sure': 0.39; 'how': 0.40; 'skip:u 10': 0.60; 'easy': 0.60; 'is.': 0.60; 'simply': 0.61; "you're": 0.61; 'first': 0.61; 'name': 0.63; 'confirm': 0.64; 'between': 0.67; 'anything.': 0.68; 'default': 0.69; 'power': 0.76; 'as:': 0.81; 'all!': 0.84; 'apt-get': 0.84; 'build-dep': 0.84; 'compiling': 0.84; 'everything,': 0.84; 'source?': 0.84; 'absolutely': 0.87; '"apt-get': 0.91; 'to:none': 0.92; 'differences': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=ksKFUB3rS/1l0q9v0uFhH4PkpPM4OVtaU62X8rv/c8M=; b=TWZB+w0Ujf9kJppVsyu0QJ181DsZ8WiTbKIQCmxCHaDACXUjLaCRAS1Q49DEJfal79 yOZkpqSji0qKIT73vxFwcYaxHz76Edm+9FBsIvBj59FI6B8qQKg8ybqKqUztdSXkdWOl DK7qfEQNwzsKsj/twc2cIU6n/n3A39/K7Hn2Krlnb7lDyDHZmtnnN+2/bOdo8xzvTgwj LjDCiChrUoObkuy9F+AAfYiPdPqyerHLzjbZ1w39kUQ/KlpV7NBqEc8Bl0n8BmR0AvPc EnJmilV50ceqCD39zjpV63yRVSjuA0PfEIH59hEpitjnVYXSWnOogoXsWvbB4Fra34Vp CL2g== MIME-Version: 1.0 X-Received: by 10.107.134.75 with SMTP id i72mr1447261iod.53.1413449311530; Thu, 16 Oct 2014 01:48:31 -0700 (PDT) In-Reply-To: <885910787.61165.1413448951311.JavaMail.yahoo@jws10777.mail.gq1.yahoo.com> References: <885910787.61165.1413448951311.JavaMail.yahoo@jws10777.mail.gq1.yahoo.com> Date: Thu, 16 Oct 2014 19:48:31 +1100 Subject: Re: what is the easiest way to install multiple Python versions? From: Chris Angelico Cc: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413449319 news.xs4all.nl 2869 [2001:888:2000:d::a6]:54370 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:79205 On Thu, Oct 16, 2014 at 7:42 PM, Albert-Jan Roskam wrote: > >> From: Chris Angelico >> Generally, this is the method I would recommend. For a start, run this: >> >> sudo apt-get build-dep python > > Aha, useful tip. But won't this (re)build the dependencies of the default python version? > Or should I do sudo apt-get build-dep python-2.6? It would install (not usually build) all the dependencies of the default Python, yes; but if you're compiling from source, that's usually going to be fairly close. For instance, if you want to build Python 3.5 from Mercurial, the easiest way to get started would be "apt-get build-dep python3"; that might not get absolutely everything, but it's sure going to be close. Python's dependencies don't change hugely between minor versions. >> But what version of Debian are you after, and why are you trying to >> build a 2.6.8 from source? On Debian Wheezy, getting hold of Python >> 2.6 should be as easy as: >> >> $ sudo apt-get install python2.6 > > I am on Debian 7.6, Wheezy (Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux). Wow, so it is really this simple? This was actually the first option I considered, but I was sooooo paranoid to ruin my default Python version. > I'm fairly sure - though you could easily confirm - that installing the python2.6 package won't fiddle with the name "python", nor the name "python2", but will simply add another name "python2.6". I have it installed on my main Wheezy system, and that's how it is. Not sure if there's a way to tweak that with update-alternatives or anything. > Reason why I need Python 2.6? The script needs to run on a server that turned out to have Python 2.6. It is beyond my power to upgrade the Python version. > > Thanks all! Fair enough. The differences between 2.6 and 2.7 aren't great, though, so you may well be able to port it trivially. But in any case, so long as you have Wheezy, you should be able to run 2.6 the easy way. ChrisA