Ich bin ziemlich neu in der Programmierung und Ubuntu. Gestern habe ich es endlich geschafft, ein Dual-Boot-System zu erstellen, also laufe ich jetzt Ubuntu 12.04 LTS. Für ein Schulprojekt muss ich in Python3 mit einem Modul namens SPARQLWrapper (https://pypi.python.org/pypi/SPARQLWrapper) arbeiten.Python3 hat keinen Zugriff auf Python2-Module (Ubuntu)
Auf meinem frisch installierten Ubuntu habe ich die neueste Version von Python installiert. Wenn ich in meinem Terminal "python3" eintippe, startet Python 3.2.3 so gut. Ich installierte easy_install (sudo apt-get installieren python-setuptools), und heruntergeladen und installiert die SPARQLWrapper Ei-Datei (sudo easy_install SPARQLWrapper-1.5.2-py3.2).
Wenn ich Python2 ausführen und "SPARQLWrapper importieren", funktioniert es einfach. Aber wenn ich das gleiche in python3 versuche es gibt mir die folgende Fehlermeldung:
[email protected]:~$ python3
Python 3.2.3 (default, Oct 19 2012, 20:10:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import SPARQLWrapper
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named SPARQLWrapper
Also mein Problem ist, dass python3 nicht in der Lage ist, die gleichen Module wie mein python2 zu dem acces. Wie behebe ich das? Danke!
ich bereits die Python 3-Version dieses Moduls installiert, auf https://pypi.python.org/pypi/ SPARQLWrapper Ich habe die Datei SPARQLWrapper-1.5.2-py3.2.egg heruntergeladen und diese installiert. Dies sollte die Python3-Version sein. – Bouke