wie fügen Sie json-Bibliothek
ich bin neu in python, auf meinem Mac, wenn ich die Ausgabe-Befehl
User:ihasfriendz user$ python main.py
Traceback (most recent call last):
File "main.py", line 2, in <module>
import json
ImportError: No module named json
Ich bekomme Fehler auf json. wie fügen Sie diese Bibliothek? ich bin mit 2,5 (der Standard kam mit leopard)
InformationsquelleAutor der Frage cometta | 2009-09-07
Du musst angemeldet sein, um einen Kommentar abzugeben.
Können Sie auch installieren simplejson.
Wenn du pip (siehe https://pypi.python.org/pypi/pip) als Python-package-manager können Sie installieren simplejson mit:
Dies ist ähnlich der Kommentar der Installation mit easy_install, aber ich bevorzuge pip zu easy_install so können Sie ganz einfach deinstallieren im pip-mit "pip uninstall-Paket".
InformationsquelleAutor der Antwort bluszcz
AFAIK das json-Modul wurde Hinzugefügt in der version 2.6 finden Sie in hier. Ich vermute, Sie können aktualisieren Sie Ihre python-installation auf die neueste stabile 2.6 von auf dieser Seite.
InformationsquelleAutor der Antwort Hole
Können Sie auch installieren json-py von hier aus http://sourceforge.net/projects/json-py/
InformationsquelleAutor der Antwort Andrew Walker