xlrd in python 3.3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gesqo
    New Member
    • Nov 2012
    • 7

    xlrd in python 3.3

    I'm trying to run with Python 3.3:

    Code:
    import lib2to3
    import sys
    import string
    import xlrd
    workbook = xlrd.open_workbook(r'C:\....xlsx',encoding_override="cp1252")
    worksheet = workbook.sheet_by_name('Sheet1')
    workbook.sheet_names()
    ..................
    I get the error message:
    Traceback (most recent call last):
    File "C:\....py" , line 23, in <module>
    import xlrd
    File "C:\Python33\li b\site-packages\xlrd\_ _init__.py", line 3, in <module>
    from info import __VERSION__
    ImportError: No module named 'info'


    The content of my Python33 folder appears in the attached image.

    On the same computer, with Python3.2,the program gives the error message:

    Traceback (most recent call last):
    File "C:\....py" , line 23, in <module>
    import xlrd
    File "C:\Python32\li b\site-packages\xlrd\_ _init__.py", line 361
    u"Consolidate_A rea": u"\x00",
    ^
    SyntaxError: invalid syntax


    Again, on the same computer, with Python 2.7, everything goes fine.


    Could anybody find an explanation and give a solution?
    Thanks.
    [IMG]C:\Users\cristi na\Documents\Pr intScreen Files\py33_.jpg[/IMG]
    Attached Files
    Last edited by Rabbit; Dec 23 '12, 04:33 AM. Reason: Please use code tags when posting code.
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    xlrd does not support Python 3+. You might try xlrd3.

    Comment

    • gesqo
      New Member
      • Nov 2012
      • 7

      #3
      Originally posted by bvdet
      xlrd does not support Python 3+. You might try xlrd3.
      I did.But it messes (xlrd3 doesn't arrive to install with "python setup.py install --prefix=c:\pytho n33")

      Comment

      Working...