Re: Broken Python 2.6 installation on Ubuntu Linux 8.04

2010-01-25 Thread John Ladasky
On Jan 24, 3:52 pm, Christian Heimes li...@cheimes.de wrote:

 By the way you mustn't install your own Python with make install, use
 make altinstall! Your /usr/local/bin/python binary masks the original
 python command in /usr/bin. You should remove all /usr/local/bin/py*
 binaries that do not end with 2.6. Otherwise you may and will break
 existing programs on your system.

 Christian

Hello Christian,

In my earlier response to Benjamin, I thought I was going to solve
this problem quickly.  Maybe not!  I know for a fact that my Linux
printer management program, HPLIP toolbox, uses wxPython.  And now
HPLIP won't start!

However, my usr/local/bin ONLY contains references to Python 2.6.  So
I think this is a problem with me installing wx... see this other
post...


http://groups.google.com/group/comp.soft-sys.wxwindows/msg/f33e245eb0956067


Sigh.  All this, just so I could use some itertools functions.

-- 
http://mail.python.org/mailman/listinfo/python-list


Broken Python 2.6 installation on Ubuntu Linux 8.04

2010-01-24 Thread John Ladasky
Hello everyone,

I've posted this same question over on ubuntuforums.org, so I'm trying
to get help in all of the logical places.

I'm running Ubuntu Linux 8.04 (Hardy) on a fairly new x86 box, with
two hard disks in a software RAID 1 configuration.

Hardy comes with Python 2.5 as a standard package, but not 2.6.  I
would really like to have the combinations function that is included
with itertools in Python 2.6.  I tried writing a combinations function
of my own, but it's SLOW and uses a HUGE amount of memory.

So, in my case the Linux Synaptic Package Manager cannot be used to
install Python 2.6.  I therefore attempted a manual installation.  I
downloaded the Linux tarball for Python 2.6 from python.org.  I
followed the installation instructions, and they appeared to execute
fine.  But when I started IDLE, I still had Python 2.5.  No good.

I do most of my editing in SCIte.  Apparently SCIte knows that I have
Python 2.6, and is trying to use it. Alas, my programs depend on extra
Python packages such as biopython, numpy and matplotlib. My Python 2.6
distro does not have these yet. None of my programs will run from
SCIte!

Looking down into the details of the install, I've discovered that
Hardy placed the Python 2.4 and 2.5 executables in /usr/bin.  My
Python 2.6 installation ended up in /usr/local/bin.  This may be
contributing to my problems.

Given the mess I've made by trying to just install plain-old Python, I
don't know whether I should attempt to back out, or to press on. Can I
convince IDLE to connect to Python 2.6?  How do I manually install
site packages?

Alternately, I COULD upgrade my Ubuntu Linux to 9.4 (Jaunty) or 9.10
(Karmic).  Python 2.6 comes standard with both of these.  But this is
why I mentioned that my storage is RAID1.  Apparently, upgrading with
RAID present is a serious headache.  The Linux wizards are supposed to
be fixing these problems in the next release, due in April.  I could
wait, I suppose.

In the mean time, I may have to uninstall Python 2.6 and get my 2.5
running again.  I have not found any instructions for how to do that.

Help!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Broken Python 2.6 installation on Ubuntu Linux 8.04

2010-01-24 Thread Benjamin Kaplan
On Sun, Jan 24, 2010 at 5:53 PM, John Ladasky lada...@my-deja.com wrote:
 Hello everyone,

 I've posted this same question over on ubuntuforums.org, so I'm trying
 to get help in all of the logical places.

 I'm running Ubuntu Linux 8.04 (Hardy) on a fairly new x86 box, with
 two hard disks in a software RAID 1 configuration.

 Hardy comes with Python 2.5 as a standard package, but not 2.6.  I
 would really like to have the combinations function that is included
 with itertools in Python 2.6.  I tried writing a combinations function
 of my own, but it's SLOW and uses a HUGE amount of memory.

 So, in my case the Linux Synaptic Package Manager cannot be used to
 install Python 2.6.  I therefore attempted a manual installation.  I
 downloaded the Linux tarball for Python 2.6 from python.org.  I
 followed the installation instructions, and they appeared to execute
 fine.  But when I started IDLE, I still had Python 2.5.  No good.


How did you start IDLE? If you started it by going to the Applications
menu, it still points to the Python 2.5 idle. If you open up a
terminal and run idle, it should run Python 2.6. If it doesn't, make a
.bashrc file in your home directory and add the line
$PATH=/usr/local/bin:$PATH.

 I do most of my editing in SCIte.  Apparently SCIte knows that I have
 Python 2.6, and is trying to use it. Alas, my programs depend on extra
 Python packages such as biopython, numpy and matplotlib. My Python 2.6
 distro does not have these yet. None of my programs will run from
 SCIte!

Extensions written in C must be recompiled for every version of
Python. Since you're using a version of Python not available through
the package manager, your packages are also not available through
that. You'll have to download the sources for those and compile them
by hand to. This is why most people stick with the precompiled
binaries.

 Looking down into the details of the install, I've discovered that
 Hardy placed the Python 2.4 and 2.5 executables in /usr/bin.  My
 Python 2.6 installation ended up in /usr/local/bin.  This may be
 contributing to my problems.


It shouldn't be. /usr/local/bin should already be on your path in
front of /usr/bin. If it isn't put it there (that's what the .bashrc
file I listed before does)

 Given the mess I've made by trying to just install plain-old Python, I
 don't know whether I should attempt to back out, or to press on. Can I
 convince IDLE to connect to Python 2.6?  How do I manually install
 site packages?


Download the package sources and compile them yourself. Python
packages have a very easy way to do that- just cd into the source
folder and run python setup.py install

 Alternately, I COULD upgrade my Ubuntu Linux to 9.4 (Jaunty) or 9.10
 (Karmic).  Python 2.6 comes standard with both of these.  But this is
 why I mentioned that my storage is RAID1.  Apparently, upgrading with
 RAID present is a serious headache.  The Linux wizards are supposed to
 be fixing these problems in the next release, due in April.  I could
 wait, I suppose.

 In the mean time, I may have to uninstall Python 2.6 and get my 2.5
 running again.  I have not found any instructions for how to do that.


Your Python2.5 installation is just fine. You can get to it by running
python2.5 at the command line (as opposed to python which should run
python2.6)

 Help!
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Broken Python 2.6 installation on Ubuntu Linux 8.04

2010-01-24 Thread Christian Heimes
Benjamin Kaplan wrote:
 Extensions written in C must be recompiled for every version of
 Python. Since you're using a version of Python not available through
 the package manager, your packages are also not available through
 that. You'll have to download the sources for those and compile them
 by hand to. This is why most people stick with the precompiled
 binaries.

As far as I remember you can use the Debian build system to create
binaries for your Python version. You have to add Python 2.6 to
/usr/share/python/debian_defaults and recompile the desired packages
with apt-get -b python-yourmodule. This should generate one to several
deb files. Install them with dpkg -i filename.deb. It's all documented
in /usr/share/doc/python/python-policy.txt.gz, read the file with zless.

By the way you mustn't install your own Python with make install, use
make altinstall! Your /usr/local/bin/python binary masks the original
python command in /usr/bin. You should remove all /usr/local/bin/py*
binaries that do not end with 2.6. Otherwise you may and will break
existing programs on your system.

Christian
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Broken Python 2.6 installation on Ubuntu Linux 8.04

2010-01-24 Thread John Ladasky
Thanks, Benjamin, I am getting a handle on this.

I've written my own Python modules before, and have installed them
using distutils.  So I know that procedure.  I just downloaded the
Numpy 1.4.0 tarball, and I succeeded in installing it.  A program I
wrote which depends on numpy ran successfully from SCIte.  I'll move
on to matplotlib and biopython next.

I also succeeded in running both the Python 2.6 and the Python 2.5
interpreters from the terminal prompt as you suggested.

Not sure whether I'll need to play with .bashrc yet.

-- 
http://mail.python.org/mailman/listinfo/python-list