
December 24th, 2012, 06:06 AM
|
|
Contributing User
|
|
Join Date: Jul 2007
Location: Joensuu, Finland
|
|
Quote: | Originally Posted by naitik if i installed any software it by defult used python2.6 as python.
but i want to use python3.0 as defulte python . |
It’s not really recommended to change the distribution’s default version of Python because it might break system scripts. Typically you just add “#!/usr/bin/env python3” at the top of all those scripts that actually need Python 3.
However, “/usr/bin/python” is a symlink to the actual Python executable in all distributions I know, so changing that will change the default Python, as in (NB. mutatis mutandis):
Code:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3 /usr/bin/python
__________________
My armada: openSUSE 12.3 (home desktop, laptop, work desktop), Ubuntu 12.04 LTS (mini laptop), Debian GNU/Linux 7.0 (server), Mythbuntu 12.04 LTS (HTPC), Bodhi Linux 2.0 & Windows 7 Ultimate (test desktop), FreeBSD 9.1 (test server)
|