[OT] How can I change Debian's default Python version?

F

Franz GEIGER

When I call the Python interpreter, the Python 2.4.1 version is called,
because I installed it weeks ago from source by myself. That means the
symlink /usr/bin/python points to 2.4. Fine.

Now, when I install Python packages using the convenient Synaptic Package
Manager, everything goes into the 2.3-directory-tree. How can I change
that?

Many thanks in advance and kind regards
Franz GEIGER
 
G

Ganesan Rajagopal

Franz GEIGER said:
Now, when I install Python packages using the convenient Synaptic Package
Manager, everything goes into the 2.3-directory-tree. How can I change
that?

That's because synaptic installs packages compiled for the default debian
python. You have two alternatives:

1. Compile the python packages manually.
2. Debian already has python 2.4. Install python2.4 using synaptic. Also
install any required python2.4-* packages. You will need a symlink to
make sure you get python2.4 by default.

Ganesan


Ganesan
 
H

Heiko Wundram

Franz said:
Now, when I install Python packages using the convenient Synaptic Package
Manager, everything goes into the 2.3-directory-tree. How can I change
that?

Simply put: not at all.

Less simply put: packages compiled for the in-tree version of Python _might_
be binary compatible with the Python you compiled yourself, but I wouldn't
bet on that. Source packages are of course compatible, and you'd just have
to manually copy these over to the 2.4-tree.

(Sym-)Linking the 2.3 site-packages to 2.4 site-packages directory might
also be something you could do, but this would probably open up a lot more
cans of worms than it's supposed to cure.

--- Heiko.
 
D

Diez B. Roggisch

Franz said:
When I call the Python interpreter, the Python 2.4.1 version is called,
because I installed it weeks ago from source by myself. That means the
symlink /usr/bin/python points to 2.4. Fine.

Now, when I install Python packages using the convenient Synaptic Package
Manager, everything goes into the 2.3-directory-tree. How can I change
that?

You can't, and shouldn't. However, most packages come with a
python-2.4-version. Install these. That of course means you need the
python-2.4 package installed using debian, not by yourself.


Regards,

Diez
 
F

F. GEIGER

Diez said:
You can't, and shouldn't. However, most packages come with a
python-2.4-version. Install these. That of course means you need the
python-2.4 package installed using debian, not by yourself.

Agreed, so I took another Linux box to make sure to not make "custom
version" mistakes.

Same here. Yes, there are 2.4-packages of all kind. But there's also a
dependency package "python" telling the whole box that Python is 2.3.5. And
when I want to install wxWidgets into Python 2.4, I am told that it depends
on Python 2.3.

I guess I'll copy the appropriate directories into my 2.4.-tree as suggested
by Heiko...
Regards,

Diez

Many thanks and kind regards
Franz
 
F

F. GEIGER

Ganesan said:
That's because synaptic installs packages compiled for the default debian
python. You have two alternatives:

1. Compile the python packages manually.
2. Debian already has python 2.4. Install python2.4 using synaptic. Also
install any required python2.4-* packages. You will need a symlink to
make sure you get python2.4 by default.

How does this symlink have to look like? Is it the one in /usr/bin ? Is this
one enough or are there others to be set as well?

I did

sudo ln -sf python2.4 python

but still don't have wx in 2.4, but only in 2.3!
Ganesan


Ganesan

Many thanks and kind regards
Franz
 
D

Diez B. Roggisch

Agreed, so I took another Linux box to make sure to not make "custom
version" mistakes.

Same here. Yes, there are 2.4-packages of all kind. But there's also a
dependency package "python" telling the whole box that Python is 2.3.5.
And when I want to install wxWidgets into Python 2.4, I am told that it
depends on Python 2.3.

sudo apt-get install python-wxgtk2.6

Which depends on python2.4

You do know aptitude, which displays dependend packages so that you can
browse from python2.4 through the dependand packages and find e.g. wx in
the correct version?

And I repeat: Copying will lead to severe problems! You're talking about
binary extensions here, that depend on a specific libpython.

Diez
 
F

Franz GEIGER

Diez said:
sudo apt-get install python-wxgtk2.6

Which depends on python2.4

No, sorry, at least not on all my Sarge boxes. I'm told "needs python2.3"
when I look at its properties from within Synaptic (Dependency Tab): Needs
python-wxversion, needs python2.3, needs libc6 (>= 2.3.5-1) etc. etc.
You do know aptitude, which displays dependend packages so that you can
browse from python2.4 through the dependand packages and find e.g. wx in
the correct version?

No, I still have to look-up such things - I am still on the move from
Windows to Linux. Thanks for the hint!
And I repeat: Copying will lead to severe problems! You're talking about
binary extensions here, that depend on a specific libpython.
Ok.


Diez

Many thanks and kind regards
Franz
 
R

Robert Kern

Franz said:
No, sorry, at least not on all my Sarge boxes. I'm told "needs python2.3"
when I look at its properties from within Synaptic (Dependency Tab): Needs
python-wxversion, needs python2.3, needs libc6 (>= 2.3.5-1) etc. etc.

As of this time, the Debian wxPython packages are only provided for Python 2.3.
I couldn't tell you why. Try looking at the bug list for python-wxgtk2.6. I'm
sure there's a bug filed against it asking for a Python 2.4 version. Perhaps the
maintainer has explained why there is no such version yet.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
N

Nick Craig-Wood

Robert Kern said:
As of this time, the Debian wxPython packages are only provided for
Python 2.3. I couldn't tell you why. Try looking at the bug list
for python-wxgtk2.6. I'm sure there's a bug filed against it asking
for a Python 2.4 version. Perhaps the maintainer has explained why
there is no such version yet.

Debian have yet to pull their finger out and switch to Python 2.4 as
the default python even 2 years and 2 months after its initial
release!

I personally find that quite frustrating since debian is my OS of
choice. (Yes, becoming a Debian developer is on my todo list along
with spend less time at the computer and more with the children ;-)

However ubuntu, which is debian/unstable packaged up for end users, is
committed to python, and hence has python2.4 and all its packages.

There is nothing to stop you using ubuntu's python packages with
careful use of apt preferences and sources.list. Or you can swap to
ubuntu completely using apt-get!
 
D

Diez B. Roggisch

Its a mistake of mine, see below.
Debian have yet to pull their finger out and switch to Python 2.4 as
the default python even 2 years and 2 months after its initial
release!

I personally find that quite frustrating since debian is my OS of
choice. (Yes, becoming a Debian developer is on my todo list along
with spend less time at the computer and more with the children ;-)

However ubuntu, which is debian/unstable packaged up for end users, is
committed to python, and hence has python2.4 and all its packages.

No wonder because of Mark Shuttleworth being its supporter - one great
guy he is :)
There is nothing to stop you using ubuntu's python packages with
careful use of apt preferences and sources.list. Or you can swap to
ubuntu completely using apt-get!

I have to admit that I did in fact check that wxgtk2.6 on my new kubuntu
machine at work. I was under the impression that they are _very_ similar
to debian, so that the packages existed for both.

Back at home (and after reading this), I checked that the wx is really
not available for 2.4. Sorry to cause confusion here.

But then I guess Franz is on his own with this - the copying stuff won't
work, that still _is_ true.

I wonder if he'd be able to make the packages work using apt-get source,
but that isn beyond my knowledge.

I can also only second your opinion about (k)ubuntu: its great. I just
installed it for my 72 year old dead :) And it was the only thing that I
could get to run on my dell gx620 - as the debian installer uses a
pre-2.6.12 kernel (2.6.8 I think) that puts the SATA-drives under the
/dev/hd* devices (and needed the compatibility-mode enabled in the bios)
- but then the 2.6.12 gets installed, and the HDs are /dev/sd*, and no
compatibility mode is required. Try to boot that... Made my balding
head lose some more hairs.

Regards,


Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top