Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I've changed the target of /usr/bin/python from /usr/bin/python2.7 to /usr/bin/python3.2 (I realize this was an ABSOUTELY HORRIBLE idea) in Ubuntu 12.04.1 LTS. Afterwards, several applications, including software-center and update-manager have stopped working. Insofar as I can tell, this is because they are written in Python2.7. I replaced the default /usr/bin/python shebang with the 2.7 one, and this fixes them on the application level. Switching /usr/bin/python back to /usr/bin/python2.7 really isn't an option, but is there a list of all applications installed by default in Ubuntu 12.04.1 LTS, if installed from a new CD-R, that use a shebang of #!/usr/bin/python instead of #!/usr/bin/pythonX.Y?

share|improve this question
    
grep ^\#\!/usr/bin/python / -R -- but bear in mind this won't work, as many will use #!/usr/bin/env python –  Sirex Sep 6 '12 at 1:16
3  
"Switching /usr/bin/python back to /usr/bin/python2.7 really isn't an option". Why isn't it? You can always use python3.2 in the shebang if you need it for a specific app. –  Renan Sep 6 '12 at 1:59

1 Answer 1

You could boot from a live-CD then grep the files in /usr/bin to find what uses Python.

But what do you want to achieve with that? Many applications haven't been ported to Python 3, often due to the lack of libraries: many don't have a Python 3 version yet, or it's still buggy. You're asking for troubles.

If you just want to use Python 3 for your programs, you can use the shebang #!/usr/bin/python3.2 or #!/usr/bin/env python3.2.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.