On 01/02/2014 08:31 AM, raj kumar wrote:
Hello, I am beginner to python and i am writing following code

from pytesser import *

and i am getting an error as follow

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "C:\Python33\lib\site-packages\pytesser.py", line 61
     print text
              ^
SyntaxError: invalid syntax


From your traceback:
   File "C:\Python33\lib\site-packages\pytesser.py", line 61
                  ^
You are using Python 3.3, but the line "print text" is Python 2 syntax.
Python 3 requires parentheses:  print(text)

Obviously the pytesser.py file is written for Python 2 and it is an error to be installed with your Python 3 packages.


How to resolve it ? Give me all steps to resolve it.


It would be nicer if you would request help rather than demand it. However, it seems to be some sort of installation error. Without knowing anything about your system we can't help with that. You'll have to figure it out for yourself, or give us more information: where you got it, how you installed it, anything else relevant.

(We do appreciate full tracebacks, however. Thank you for that. Many people summarize or paraphrase error messages, which is not as helpful.)

     -=- Larry -=-

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to