The syntax error is probably due to the fact that the program is written in
Python 2 and not 3. Try using "pip" instead of "pip3". This is just a
guess, I'm not sure if the bindings are written in Python 3.

On Tue, 4 Aug 2015 12:57 am David Martinez <[email protected]> wrote:

> Thank you for your help Sushain.
> Unfortunately I get a syntax error when I try "pip3 install pysqlite"
> (attached below). I looked for the error in other forums, but none of the
> alternatives I tried to install pysqlite seem to work on my system.
> Is there anything else I could try?
> Thank you,
> David
>
>
> Collecting pysqlite
>   Downloading pysqlite-2.6.3.tar.gz (76kB)
>     100% |████████████████████████████████| 77kB 2.1MB/s
>     Complete output from command python setup.py egg_info:
>
>     Traceback (most recent call last):
>       File "<string>", line 20, in <module>
>       File "/tmp/pip-build-kecwf7/pysqlite/setup.py", line 85
>         print "Is sphinx installed? If not, try 'sudo easy_install
> sphinx'."
>
> ^
>     SyntaxError: invalid syntax
>
>     ----------------------------------------
> Command "python setup.py egg_info" failed with error code 1 in
> /tmp/pip-build-kecwf7/pysqlite
>
>
> On Sat, Aug 1, 2015 at 12:12 PM, Sushain Cherivirala <[email protected]>
> wrote:
>
>> Try `sudo apt-get install libsqlite3-dev & pip3 install pysqlite` (or
>> equivalent).
>>
>> --
>> Sushain K. Cherivirala
>> www.skc.name
>>
>> On Thu, Jul 30, 2015 at 1:24 PM, David Martinez <[email protected]>
>> wrote:
>>
>>> Thanks Sushain,
>>> unfortunately I tried that (installing and reinstalling sqlite3 as you
>>> suggest), and I still get the same error.
>>> I paste the full trace in case it helps,
>>> thanks,
>>> David
>>>
>>> Traceback (most recent call last):
>>>   File "servlet.py", line 23, in <module>
>>>     from modeSearch import searchPath
>>>   File
>>> "/home/davidm/Install/apertium/apertium-tools/apertium-apy/modeSearch.py",
>>> line 2, in <module>
>>>     from util import toAlpha3Code
>>>   File
>>> "/home/davidm/Install/apertium/apertium-tools/apertium-apy/util.py", line
>>> 4, in <module>
>>>     import sqlite3, re, os, logging
>>>   File "/usr/local/lib/python3.3/sqlite3/__init__.py", line 23, in
>>> <module>
>>>     from sqlite3.dbapi2 import *
>>>   File "/usr/local/lib/python3.3/sqlite3/dbapi2.py", line 26, in <module>
>>>     from _sqlite3 import *
>>> ImportError: No module named '_sqlite3'
>>>
>>>
>>> On Thu, Jul 30, 2015 at 10:54 AM, Sushain Cherivirala <[email protected]>
>>> wrote:
>>>
>>>> David,
>>>> `
>>>> You need to install sqlite3 first before installing the Python bindings
>>>> via pip. Your package manager should work, e.g. `sudo apt-get install
>>>> sqlite3`.
>>>>
>>>> --
>>>> Sushain K. Cherivirala
>>>> www.skc.name
>>>>
>>>> On Thu, Jul 30, 2015 at 12:25 PM, David Martinez <[email protected]>
>>>> wrote:
>>>>
>>>>> Hello Sushain,
>>>>> thanks for responding. I realised I was running 3.2, and that's why I
>>>>> got the syntax error. However, when I run python3.3, I get the following
>>>>> error:
>>>>>
>>>>> ImportError: No module named '_sqlite3'
>>>>>
>>>>> I tried to run "pip3 install pysqlite" to avoid this, but it doesn't
>>>>> allow me. Do you have any pointers?
>>>>> Thank you,
>>>>> David
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Jul 30, 2015 at 9:19 AM, Sushain Cherivirala <[email protected]
>>>>> > wrote:
>>>>>
>>>>>> David,
>>>>>>
>>>>>> How exactly are you running it? `python3 servlet.py`? If so, what
>>>>>> version does `python3` show?
>>>>>>
>>>>>> --
>>>>>> Sushain K. Cherivirala
>>>>>> www.skc.name
>>>>>>
>>>>>> On Wed, Jul 29, 2015 at 3:09 PM, David Martinez <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Dear list members,
>>>>>>> I am trying to install apertium-apy in Ubuntu 12.04, but I keep
>>>>>>> running into problems. I think that the main issue is the following:
>>>>>>>
>>>>>>> - I installed python3.3, and then pip3, toro, and tornado making
>>>>>>> sure that I use python3.3 for each.
>>>>>>> - However, when I run servlet.py, I get the error (SyntaxError:
>>>>>>> 'return' with argument inside generator), which suggests that it's using
>>>>>>> 3.2.
>>>>>>>
>>>>>>> If I remove anything related to python 3.2, then in doesn't find
>>>>>>> tornado.
>>>>>>> I think that I'm stuck, could somebody point me in the right
>>>>>>> direction?
>>>>>>> Thank you,
>>>>>>> David
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Apertium-stuff mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>>
>>>>>> _______________________________________________
>>>>>> Apertium-stuff mailing list
>>>>>> [email protected]
>>>>>> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> Apertium-stuff mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>>>>>
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Apertium-stuff mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Apertium-stuff mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Apertium-stuff mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>>
>>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Apertium-stuff mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>
------------------------------------------------------------------------------
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to