Announcement

Collapse
No announcement yet.

Changeing default Python versions

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changeing default Python versions

    Greetings All,
    We need to tell Kubuntu to make an earlier version of Python the default version dpkg sees.
    Can someone please tel us how to change it temporarily?
    We searched and read and searched but cant find it.

    Thanks for your time.

    #2
    Re: Changeing default Python versions

    You may redirect the "default pointer" (/usr/bin/python, linked to /usr/bin/python2.4)

    Code:
    ROOT@C3PO # ls -l /usr/bin/python*
    lrwxrwxrwx 1 root root  9 2006-10-26 18:08 /usr/bin/python -> python2.4
    -rwxr-xr-x 1 root root 996K 2006-10-11 23:52 /usr/bin/python2.4
    To receive detailed advice, please post your machine's feedback to ls -l /usr/bin/python*

    Comment


      #3
      redirecting Pythons default pointer

      thanks penguine ch!


      $ ls -l /usr/bin/python*
      lrwxrwxrwx 1 root root 9 2006-12-02 10:42 /usr/bin/python -> python2.4
      -rwxr-xr-x 1 root root 1019680 2006-10-11 14:52 /usr/bin/python2.4
      -rwxr-xr-x 1 root root 1145032 2006-10-06 08:23 /usr/bin/python2.5
      -rwxr-xr-x 1 root root 1276 2006-10-06 08:23 /usr/bin/python2.5-config

      going to read up redirecting pointers

      Comment


        #4
        Re: Changeing default Python versions

        Tuxgrrrl,

        in the case specified, the following should do:

        Code:
        # backup
        sudo cp /usr/bin/python /usr/bin/python.orig
        # "redirect"
        sudo ln -s /usr/bin/python2.5 /usr/bin/python
        # check
        ls -l /usr/bin/python*
        # learn ;-)
        man ln

        Comment


          #5
          Still no link for dpkg


          Thanks again UnicornRider,


          Python 2.3 is in /usr/local/bin

          when given $ ls -l /usr/local/bin/python*
          -rwxr-xr-x 2 root root 3002090 2007-02-04 09:56 /usr/local/bin/python
          -rwxr-xr-x 2 root root 3002090 2007-02-04 09:56 /usr/local/bin/python2.3

          but when given $ sudo ln -s /usr/local/bin/python2.3 /usr/bin/python
          ln: creating symbolic link `/usr/bin/python' to `/usr/local/bin/python2.3': File exists

          However

          dpkg: dependency problems prevent configuration of cpia-control:
          cpia-control depends on python (<< 2.4); however:
          Version of python on system is 2.4.3-11ubuntu3

          dpkg still only sees Python 2.4...

          Do we have to reboot or is dpkg looking elsewhere?

          Comment


            #6
            Re: Changeing default Python versions

            [quote=Tuxgrrrl]
            but when given $ sudo ln -s /usr/local/bin/python2.3 /usr/bin/python
            ln: creating symbolic ]

            Sorry ... please (re-)move the given link first (instead of merely copying it):

            Code:
            sudo mv /usr/bin/python /usr/bin/python.orig
            Originally posted by Tuxgrrrl
            dpkg still only sees Python 2.4
            Please (re-)try the above, then check as mentioned ... if this fails, please post the system's feedback to which python ... however, there is no need for reboot (- no "Windozism" here, penguins are sensitive).

            Comment


              #7
              redirect still not seen

              Thanks again for your time UnicornRider.
              We got axed by the ISP...

              # ls -l /usr/bin/python*
              lrwxrwxrwx 1 root root 24 2007-02-04 13:35 /usr/bin/python -> /usr/local/bin/python2.3
              -rwxr-xr-x 1 root root 1019680 2006-10-11 14:52 /usr/bin/python2.4
              -rwxr-xr-x 1 root root 1145032 2006-10-06 08:23 /usr/bin/python2.5
              -rwxr-xr-x 1 root root 1276 2006-10-06 08:23 /usr/bin/python2.5-config
              lrwxrwxrwx 1 root root 9 2006-12-02 10:42 /usr/bin/python.orig -> python2.4

              # dpkg -i cpia-control_0.5.1-2_i386.deb
              ...
              dpkg: dependency problems prevent configuration of cpia-control:
              cpia-control depends on python (<< 2.4); however:
              Version of python on system is 2.4.3-11ubuntu3.


              Comment

              Working...
              X