ubuntuusers.de

"python" startet python 2.5, soll aber 2.7 starten

Status: Gelöst | Ubuntu-Version: Ubuntu 12.04 (Precise Pangolin)
Antworten |

kegelkugel

Avatar von kegelkugel

Anmeldungsdatum:
12. Oktober 2009

Beiträge: 88

Wohnort: München

Hallo,

wenn ich das Programm "python" starte, wird die Version 2.5 gestartet (veraltet). Es soll jedoch, wie bei "python2" Python in Version 2.7 gestartet werden. Im Verzeichnis /usr/bin ist alles so, wie es sein soll:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
:/usr/bin$ ls -l python*
lrwxrwxrwx 1 root root       9 Apr 17 19:19 python -> python2.7
lrwxrwxrwx 1 root root       9 Apr 17 19:19 python2 -> python2.7
-rwxr-xr-x 1 root root 2472512 Aug 11  2011 python2.6
-rwxr-xr-x 1 root root 2799440 Apr 21 01:47 python2.7
-rwxr-xr-x 1 root root 5602211 Apr 21 00:09 python2.7-dbg
-rwxr-xr-x 1 root root    1656 Apr 21 01:46 python2.7-dbg-config
lrwxrwxrwx 1 root root      13 Apr 17 19:19 python2-dbg -> python2.7-dbg
lrwxrwxrwx 1 root root      20 Apr 17 19:19 python2-dbg-config -> python2.7-dbg-config
lrwxrwxrwx 1 root root       9 Apr 15 07:13 python3 -> python3.2
lrwxrwxrwx 1 root root      11 Mai  3 17:56 python3.2 -> python3.2mu
-rwxr-xr-x 1 root root 2788192 Mai  3 17:56 python3.2mu
lrwxrwxrwx 1 root root      11 Apr 15 07:13 python3mu -> python3.2mu
-rwxr-xr-x 1 root root     300 Apr 23 12:11 python-coverage
lrwxrwxrwx 1 root root      13 Apr 17 19:19 python-dbg -> python2.7-dbg
lrwxrwxrwx 1 root root      20 Apr 17 19:19 python-dbg-config -> python2.7-dbg-config

Kann mir bitte jemand sagen, woran das liegt und mir helfen, dass durch Eingabe von "python" die Version 2.7 gestartet wird? Vielen Dank! ☺

Grüße, Markus

Nachtrag: "/usr/bin/env python" startet ebenfalls Version 2.5, "/usr/bin/python" Version 2.7

Und mir ist nochwas aufgefallen:

1
2
3
:~$ /usr/bin/python
Python 2.7.3 (default, Apr 20 2012, 22:44:07) 
[GCC 4.6.3] on linux2
1
2
3
:~$ python2
Python 2.7.3 (default, Apr 20 2012, 22:44:07) 
[GCC 4.6.3] on linux2
  • > linux2

1
2
3
:~$ /usr/bin/env python
Python 2.5.6 (r256:88840, Feb 11 2012, 16:00:25) 
[GCC 4.6.1] on linux3
1
2
3
:~$ python
Python 2.5.6 (r256:88840, Feb 11 2012, 16:00:25) 
[GCC 4.6.1] on linux3
  • > linux3

diesch Team-Icon

Avatar von diesch

Anmeldungsdatum:
18. Februar 2009

Beiträge: 5072

Wohnort: Brandenburg an der Havel

Was sagt

1
which python

kegelkugel

(Themenstarter)
Avatar von kegelkugel

Anmeldungsdatum:
12. Oktober 2009

Beiträge: 88

Wohnort: München

Erstmal danke für die Antwort.

1
2
:~$ which python
/usr/local/bin/python

diesch Team-Icon

Avatar von diesch

Anmeldungsdatum:
18. Februar 2009

Beiträge: 5072

Wohnort: Brandenburg an der Havel

Du hast also wohl irgendwann dieses Jahr ein Python 2.5.6 nach /usr/local/ installiert - möglicherweise als Teil von irgendwas anderem.

Ich würde das erst mal in /usr/local/bin/python2.5 umbenennen und dann mal überlegen, woher das kommt, und ob du es noch brauchst.

kegelkugel

(Themenstarter)
Avatar von kegelkugel

Anmeldungsdatum:
12. Oktober 2009

Beiträge: 88

Wohnort: München

Nochmal danke! ☺ Eine identische Datei python2.5 hat bereits in /usr/local/bin existiert; die Datei /usr/local/bin/python brauch' ich also nicht mehr. Ehrlichgesagt, habe ich keine Ahnung, wofür ich Python 2.5 mal benötigt habe, aber wenigstens funktioniert's jetzt wieder einwandfrei. ☺

P.S.: Der ClassicMenu Indicator gefällt mir richtig gut! Ich verwende ihn jetzt als Menü in Openbox mit tint2 als Panel. Danke!

Antworten |