Seite 1 von 1
Python 3 auf MAC
Verfasst: Sonntag 31. Mai 2009, 21:33
von kostonstyle
Hallo miteinander
wie installiere python 3 auf dem MAC, damit es nicht in dem Verzeichniss application installiert wird...
Verfasst: Sonntag 31. Mai 2009, 23:29
von sma
Siehe
http://www.python-forum.de/post-118512.html
Ich habe mir eben erlaubt, den Beitrag an Python 3.0.1 und Readline 6.0 anzupassen.
Alternative wäre
Macports installieren und dann ein "sudo port install python30" einzugeben. Macports installiert alles unter `/opt/local` und tastet das restliche System nicht an. MacPorts kompiliert dann aber Gott und die Welt, bevor es endlich zu Python kommt und das auf die Platte kippt.
Stefan
Verfasst: Mittwoch 10. Juni 2009, 19:04
von kostonstyle
wenn ich den Update Shell Profile.command ausführe, erhalte ich die meldung
Last login: Wed Jun 10 20:43:34 on ttys000
develops-macbook-pro:~ develop$ /Applications/Python\ 3.0/Update\ Shell\ Profile.command ; exit;
This script will update your shell profile when the 'bin' directory
of python is not early enough of the PATH of your shell.
These changes will be effective only in shell windows that you open
after running this script.
All right, you're a python lover already
logout
[Process completed]
warum?
Verfasst: Mittwoch 10. Juni 2009, 19:51
von Leonidas
Warum ist alles gut gelaufen? Na weil es keine Fehler gab.
Verfasst: Donnerstag 11. Juni 2009, 15:56
von kostonstyle
ok......
eine andere frage, ich benutze komodo ide, wie kann es feststellen, dass komodo ide den Python 3 SDK benutzt, oder wo kann ich es einstellen?
Verfasst: Donnerstag 11. Juni 2009, 16:13
von EyDu
Feststellen geht ganz einfach:
Verfasst: Freitag 12. Juni 2009, 08:36
von sma
Genau, und wenn das einen Syntaxfehler ergibt, ist es wahrscheinlich Python 3 ;) Besser, mal testet mit `print(sys.version)`, das läuft dann sowohl unter Python 2.x und Python 3.x.
Stefan
Verfasst: Freitag 12. Juni 2009, 12:47
von kostonstyle
es ist leider version 2.5
2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)]
wo kann ich es in komodo ide einstellen, dass er die version 3 nehmen soll....
Verfasst: Freitag 12. Juni 2009, 21:49
von kostonstyle
so habe es herausgefunden, es ist in dem verzeichnis /usr/local/bin/pythonw
wenn ich nun mit komodo ide python programm kompiliere möchte erhalte ich die meldung
File "/Applications/Komodo IDE.app/Contents/SharedSupport/dbgp/bin/pydbgp", line 139
except LookupError, e:
^
SyntaxError: invalid syntax
was heisst das?
Verfasst: Samstag 13. Juni 2009, 09:06
von sma
kostonstyle hat geschrieben:was heisst das?
Das ist Python 2.x-Code, der unter Python 3.x nicht mehr läuft. Dort wäre es ein `except LookupError as e:`. Siehe
http://docs.python.org/3.0/whatsnew/2.6.html#pep-3110
Und 2min Google ergibt
dies.
Ich glaube, mit Pydev hast du die größte Chance, dass es mit Python 3.x funktioniert. Netbeans und IDEA können zur Zeit definitiv nicht Python 3.x-Code debuggen. Bei anderen IDEs kann ich's dir nicht sagen.
Stefan