[Bug 366096] [NEW] default of python 2.5 breaks CommandNotFound import

Michael gundlach.business at gmail.com
Fri Apr 24 13:54:04 UTC 2009


Public bug reported:

Binary package hint: command-not-found

mgundlach at ubuntu:~$ apt-cache policy command-not-found
command-not-found:
  Installed: 0.2.34ubuntu3
  Candidate: 0.2.34ubuntu3
  Version table:
 *** 0.2.34ubuntu3 0
        500 http://mirrors.rit.edu jaunty/main Packages
        100 /var/lib/dpkg/status

mgundlach at ubuntu:~$ lsb_release -rd
Description:	Ubuntu 9.04
Release:	9.04


This is related to https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/234540 , where setting python2.4 as the default on a python2.5 box broke CommandNotFound.  Having just updated from Intrepid to Jaunty, and setting python2.5 as the default on my (suddenly) python2.6 box, CommandNotFound breaks.

mgundlach at ubuntu:~$ sudo rm /usr/bin/python && sudo ln -s /usr/bin/python2.5 /usr/bin/python
mgundlach at ubuntu:~$ l
Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 8, in <module>
    import CommandNotFound
ImportError: No module named CommandNotFound
mgundlach at ubuntu:~$ sudo rm /usr/bin/python && sudo ln -s /usr/bin/python2.6 /usr/bin/python
mgundlach at ubuntu:~$ l
bash: l: command not found
mgundlach at ubuntu:~$ 

Interestingly, I tried modifying /usr/lib/command-not-found to use
python2.6 explicitly instead of #!/usr/bin/python, and got the same
behavior.  I'm guessing that command-not-found is called somewhere
within bash(?) as "python /usr/lib/command-not-found" instead of
"/usr/lib/command-not-found" or "python2.6 /usr/lib/command-not-found".

** Affects: command-not-found (Ubuntu)
     Importance: Undecided
         Status: New

-- 
default of python 2.5 breaks CommandNotFound import
https://bugs.launchpad.net/bugs/366096
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list