1

I'm trying to import the xlrd (Excel for python) library into Pydev.
I'm using python 3.3.2, eclipse 1.4, Pydev 0.4, xlrd 0.7.1.
my code is:

from xlrd import open_workbook

I'm getting the following error:

    from xlrd import open_workbook
    File "C:\Python33\lib\site-packages\xlrd\__init__.py", line 1187
    print "EXTERNSHEET(b7-):"
                        ^
    SyntaxError: invalid syntax

What I tried (according to here):

  • in the properties of the pydev project, add to "PyDev - PYTHONPATH" the xlrd folder, and site_packages folder as well
  • change to C:\Python27\lib\site-packages instead of C:\Python27\Lib\site-packages
  • remove the PyDev project config' by right clicking on the project. Then make it a PyDev project again
  • delete the Python interpreter from "Python interpreters" and add it again
  • add the xlrd folder in the interpreter
  • File -> Restart" and not closing and reopening manually

Before I installed xlrd 0.7.1, I installed an advanced version (it didnt work also), but I deleted the library, before installing the 0.7.1 one.

Help :S

Community
  • 1
  • 1
Presen
  • 1,809
  • 4
  • 31
  • 46

0 Answers0