Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #16659 > unrolled thread
| Started by | patrickwayodi <patrickwayodi@gmail.com> |
|---|---|
| First post | 2011-12-05 06:53 -0800 |
| Last post | 2011-12-14 20:40 +0200 |
| Articles | 9 — 5 participants |
Back to article view | Back to comp.lang.python
How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) patrickwayodi <patrickwayodi@gmail.com> - 2011-12-05 06:53 -0800
Re: How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) Chris Angelico <rosuav@gmail.com> - 2011-12-06 02:08 +1100
Re: How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) patrickwayodi <patrickwayodi@gmail.com> - 2011-12-05 07:40 -0800
Re: How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) Chris Angelico <rosuav@gmail.com> - 2011-12-06 02:51 +1100
Re: How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-05 16:23 +0000
Re: How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) Chris Angelico <rosuav@gmail.com> - 2011-12-06 03:28 +1100
Re: How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) Christian Heimes <lists@cheimes.de> - 2011-12-05 17:37 +0100
Re: How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) Christian Heimes <lists@cheimes.de> - 2011-12-05 17:39 +0100
Re: How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) Anssi Saari <as@sci.fi> - 2011-12-14 20:40 +0200
| From | patrickwayodi <patrickwayodi@gmail.com> |
|---|---|
| Date | 2011-12-05 06:53 -0800 |
| Subject | How to install Python on Debian GNU/Linux (Python-2.7.2.tar.bz2) |
| Message-ID | <b43f5db6-050e-49d8-ac03-7b9ef1071406@u5g2000vbd.googlegroups.com> |
Hi, How can I install Python on Debian GNU/Linux? I downloaded the file "Python-2.7.2.tar.bz2" but I don't know how to install it. Patrick.
[toc] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-12-06 02:08 +1100 |
| Message-ID | <mailman.3302.1323097739.27778.python-list@python.org> |
| In reply to | #16659 |
On Tue, Dec 6, 2011 at 1:53 AM, patrickwayodi <patrickwayodi@gmail.com> wrote: > Hi, > How can I install Python on Debian GNU/Linux? I downloaded the file > "Python-2.7.2.tar.bz2" but I don't know how to install it. You should actually already have Python installed. Try typing 'python' at a terminal and see if it invokes the interactive interpreter. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | patrickwayodi <patrickwayodi@gmail.com> |
|---|---|
| Date | 2011-12-05 07:40 -0800 |
| Message-ID | <0da3ce5f-72ca-43a2-a2ae-18fd1dd2c46d@e2g2000vbb.googlegroups.com> |
| In reply to | #16660 |
> You should actually already have Python installed. Try typing 'python' > at a terminal and see if it invokes the interactive interpreter. > > ChrisA Yes, I have Python installed, but it's an old version. So I want to upgrade to "Python-2.7.2.tar.bz2".
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-12-06 02:51 +1100 |
| Message-ID | <mailman.3304.1323100284.27778.python-list@python.org> |
| In reply to | #16661 |
On Tue, Dec 6, 2011 at 2:40 AM, patrickwayodi <patrickwayodi@gmail.com> wrote: >> You should actually already have Python installed. Try typing 'python' >> at a terminal and see if it invokes the interactive interpreter. >> >> ChrisA > > > Yes, I have Python installed, but it's an old version. So I want to > upgrade to "Python-2.7.2.tar.bz2". Ah gotcha. I believe you can 'sudo apt-get install python2.7' - at least, you can on the Ubuntu system next to me. Not sure though; I build my Python from source straight from Mercurial. What you have there, I think, is a source code snapshot. You'd need to extract it and then do the usual incantation: $ ./configure $ make $ sudo make install If you don't have the compiler/build environment set up, you'll have to do that first. If you aren't too concerned about the exact version you get, the above apt-get line should get you a stable Python in the 2.7 branch. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2011-12-05 16:23 +0000 |
| Message-ID | <4edceff9$0$29988$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #16662 |
On Tue, 06 Dec 2011 02:51:21 +1100, Chris Angelico wrote: > On Tue, Dec 6, 2011 at 2:40 AM, patrickwayodi <patrickwayodi@gmail.com> > wrote: >>> You should actually already have Python installed. Try typing 'python' >>> at a terminal and see if it invokes the interactive interpreter. >>> >>> ChrisA >> >> >> Yes, I have Python installed, but it's an old version. So I want to >> upgrade to "Python-2.7.2.tar.bz2". > > Ah gotcha. I believe you can 'sudo apt-get install python2.7' - at > least, you can on the Ubuntu system next to me. Not sure though; I build > my Python from source straight from Mercurial. > > What you have there, I think, is a source code snapshot. You'd need to > extract it and then do the usual incantation: $ ./configure > $ make > $ sudo make install And you have now potentially broken your system python :( Generally speaking, unless you are an expert, you should not use make install when installing Python from source, because it will replace the system Python with the newly installed one. Instead use `sudo make altinstall`. This is exactly the same as install, except it won't replace the python symlink that points to the actual Python executable. That way system tools that call Python get the version they are expecting, together with any libraries installed for their use, while you can call the version you prefer manually. Or set up an alias in your bashrc file. > If you don't have the compiler/build environment set up, you'll have to > do that first. The trickiest part for me is ensuring that tkinter works correctly. After installing Python from source about a dozen times now, I still don't know why sometimes it works and sometimes it doesn't. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-12-06 03:28 +1100 |
| Message-ID | <mailman.3307.1323102510.27778.python-list@python.org> |
| In reply to | #16665 |
On Tue, Dec 6, 2011 at 3:23 AM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > Generally speaking, unless you are an expert, you should not use make > install when installing Python from source, because it will replace the > system Python with the newly installed one. > > Instead use `sudo make altinstall` Mea culpa, forgot that. Yes, use altinstall. Although it's probably not a problem to replace 2.6.6 with 2.7.2 - I doubt that'll break many things. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Christian Heimes <lists@cheimes.de> |
|---|---|
| Date | 2011-12-05 17:37 +0100 |
| Message-ID | <mailman.3308.1323103045.27778.python-list@python.org> |
| In reply to | #16665 |
Am 05.12.2011 17:23, schrieb Steven D'Aprano: > The trickiest part for me is ensuring that tkinter works correctly. After > installing Python from source about a dozen times now, I still don't know > why sometimes it works and sometimes it doesn't. sudo apt-get build-dep python2.7 Done ;) However there are additional pitfalls if you have multiarch support or Kernel 3.x. Both are well documented in my blog http://lipyrary.blogspot.com/ Christian
[toc] | [prev] | [next] | [standalone]
| From | Christian Heimes <lists@cheimes.de> |
|---|---|
| Date | 2011-12-05 17:39 +0100 |
| Message-ID | <mailman.3309.1323103216.27778.python-list@python.org> |
| In reply to | #16665 |
Am 05.12.2011 17:28, schrieb Chris Angelico: > On Tue, Dec 6, 2011 at 3:23 AM, Steven D'Aprano > <steve+comp.lang.python@pearwood.info> wrote: >> Generally speaking, unless you are an expert, you should not use make >> install when installing Python from source, because it will replace the >> system Python with the newly installed one. >> >> Instead use `sudo make altinstall` > > Mea culpa, forgot that. Yes, use altinstall. Although it's probably > not a problem to replace 2.6.6 with 2.7.2 - I doubt that'll break many > things. Except that all 3rd party extensions and packages are missing if you install Python manually. Unless you *really* know what you are doing you shouldn't install Python manually. Debian's backports should provide a well integrated Python 2.7 package. Christian
[toc] | [prev] | [next] | [standalone]
| From | Anssi Saari <as@sci.fi> |
|---|---|
| Date | 2011-12-14 20:40 +0200 |
| Message-ID | <vg3k45z3skj.fsf@sci.fi> |
| In reply to | #16669 |
Christian Heimes <lists@cheimes.de> writes: >> Mea culpa, forgot that. Yes, use altinstall. Although it's probably >> not a problem to replace 2.6.6 with 2.7.2 - I doubt that'll break many >> things. > > Except that all 3rd party extensions and packages are missing if you > install Python manually. True, they would have to be built or at least installed manually also. Major work, especially for a beginner. Shouldn't pick Debian Stable and then want current software... Then again, even the standard install of Python has plenty of stuff. I installed 2.7.2 on my Debian system just to try out some of the new Tk stuff. > Debian's backports should provide a well integrated Python 2.7 > package. But it doesn't. Python 2.7.2 is in Wheezy, which is the current testing version of Debian. Looks like it has about 700 release critical bugs, so it'll be a while until release.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web