Results 1 to 2 of 2

Thread: Changing default version of python in Lucid 10.04

  1. #1
    Join Date
    May 2010
    Location
    Boston
    Beans
    2
    Distro
    Ubuntu 8.04 Hardy Heron

    Changing default version of python in Lucid 10.04

    Here's how you change the default version of python in Lucid. Lucid comes packaged with 2.6 but we use 2.5 where I work. I didn't see much of anything on the web for this topic so figured I'd post something.

    If you are installing python2.5 on Lucid version 10.04 (comes package with 2.6 only)



    • Next you need to change the default version of python
      • vim /usr/share/python/debian_defaults - change the default version to python2.5
      • Now you need to remove all the symlinks of python2.6 and related files to python then relink them to python2.5
        • unlink /usr/bin/pydoc
        • ln -s /usr/bin/pydoc2.5 /usr/bin/python
        • unlink /usr/bin/pygettext
        • ln -s /usr/bin/pygettext2.5 /usr/bin/pygettext
        • unlink /usr/bin/python
        • ln -s /usr/bin/python2.5 /usr/bin/python
        • unlink /usr/bin/python2
        • ln -s /usr/bin/python2.5 /usr/bin/python2
        • unlink /usr/bin/python-config
        • ln -s /usr/bin/python-config2.5 /usr/bin/python-config

      • Now log into python shell, it should show the version as 2.5: Python 2.5.5 (r255:77872, Sep 14 2010, 17:19:13)


  2. #2
    Join Date
    Jun 2007
    Location
    Oklahoma City, OK
    Beans
    200
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Changing default version of python in Lucid 10.04

    update-alternatives --install /usr/bin/python python /usr/lib/python2.6 1
    update-alternatives --install /usr/bin/python python /usr/lib/python2.5 10
    Te audire no possum. Musa sapientum fixa est in aure.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •