Im abbastanza nuovo per la programmazione e Ubuntu. Ieri sono finalmente riuscito a creare un sistema dual-boot, quindi ora sto usando Ubuntu 12.04 LTS. Per un progetto scolastico, ho bisogno di lavorare in Python3 con un modulo chiamato SPARQLWrapper (https://pypi.python.org/pypi/SPARQLWrapper).Python3 non ha accesso ai moduli python2 (ubuntu)
Sul mio Ubuntu appena installato, ho installato l'ultima versione di Python. Quando digito "python3" nel mio terminale, python 3.2.3 parte così bene. Ho installato easy_install (sudo apt-get install python-setuptools), scaricato e installato il file egg SPARQLWrapper (sudo easy_install SPARQLWrapper-1.5.2-py3.2).
Se eseguo python2 e utilizzo "import SPARQLWrapper", funziona. Ma se provo lo stesso in python3 mi dà il seguente errore:
[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
Quindi il mio problema è che non è in grado python3 per accedere alle stessi moduli come il mio python2. Come posso risolvere questo? Grazie!
ho già installato la versione Python 3 di questo modulo, su https://pypi.python.org/pypi/ SPARQLWrapper Ho scaricato il file SPARQLWrapper-1.5.2-py3.2.egg e l'ho installato. Questa dovrebbe essere la versione di Python3. – Bouke