>
>On Mon Jan 26 17:51 , DragonSlayre  sent:
>
>>
>>
>>
>>On Jan 27, 1:41 pm, sha...@speakeasy.net> wrote:
>>
>>> Does this help? Found via google and ubuntu
>forums.https://launchpad.net/~doko/+archive
>>>
>>> Sorry, I run Debian (which ubuntu is based on), I just apt-get install all 
>>> of the
>>> available python versions and then run /usr/bin/python to test things.
>>
>>The problem isn't installing python, which can be done through the
>>package manager or with apt-get, but the problem is for example
>>changing back to 2.5 once 2.6 is installed.
>
>It should install a binary as python2.6. It should not touch your python2.5
>binary. Then you simply call the version you are interested in. Or change the
>/usr/bin/python symlink.
>

I just say your mail to Steve asking for people to be very clear in their
explanations. Sorry, many of us make the (incorrect) assumption that if you are
using Linux, experimenting with the package managers, etc. that there is a
certain level of shell competency. This is in no way intended as a jab at you or
others. When many of us started doing this, we were thrown into the deep water
and struggled to swim. These days with all of the GUI support, easy OS installs,
etc. it is easy for us to forget that today's newbie did not have to fight as
hard as those in the past. Again, this is not a "you have not bled enough, leave
us alone" comment. Just explaining where many of us are coming from.

May I recommend a great book called Unix Shells by Example.
http://www.amazon.com/UNIX-R-Shells-Example-4th/dp/013147572X/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1233081731&sr=8-1
(note there is no referral ID in that link). The lady who wrote it does a great
job. It explains all of the common shell tools. Read it, pass it around to your
friends. I leave a copy at work to hand over to new hires.

Now back to the topic at hand.

In Debian and ubuntu, great care is taken to support upgrading and testing. Each
Python version will be installed in a version specific directory. So python 2.4
will be /usr/bin/python2.4 and have its files stored in /usr/lib/python2.4/...,
etc. This means you can install as many python packages as you like and then 
just
invoke the correct binary for the task at hand. What this means for you is 
python
2.6 packages should be safe to install and can be invoked as python2.6. You can
edit the Django command line tool to call python2.6 instead of just python. Then
the right version will be called.

When the distribution considers a version of python the standard for a release
all they do is set the /usr/bin/python symbolic link to the correct binary. It 
is
a bad idea to change this link unless you are sure all of the software you need
can run safely with that python version.

$PYTHONHOME is not necessarily the variable you need to set. Sometimes it is, it
all depends on how you installed Python. If you only use packages, then simply
invoking the correct binary is 100% the easiest way and requires no other
changes. If you compile from sources, then be sure to place the output in
/usr/local or /opt/<something>. When you then call /usr/local/bin/python or
/opt/python2.6/bin/python the right files should be used. But all of this 
assumes
you update the Django scripts to call the right python and not just depend on
/usr/bin/python or '/usr/bin/env python' to find the right one. It is OK to edit
this scripts, honest. (-:


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to