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
?
-
grep ^\#\!/usr/bin/python / -R -- but bear in mind this won't work, as many will use #!/usr/bin/env python– SirexSep 6, 2012 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.– RenanSep 6, 2012 at 1:59
Add a comment
|
1 Answer
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
.