470,863 Members | 1,185 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,863 developers. It's quick & easy.

xlrd in python 3.3

gesqo
7
I'm trying to run with Python 3.3:

Expand|Select|Wrap|Line Numbers
  1. import lib2to3
  2. import sys
  3. import string
  4. import xlrd
  5. workbook = xlrd.open_workbook(r'C:\....xlsx',encoding_override="cp1252")
  6. worksheet = workbook.sheet_by_name('Sheet1')
  7. workbook.sheet_names()
  8. ..................
I get the error message:
Traceback (most recent call last):
File "C:\....py", line 23, in <module>
import xlrd
File "C:\Python33\lib\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\lib\site-packages\xlrd\__init__.py", line 361
u"Consolidate_Area": 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\cristina\Documents\PrintScreen Files\py33_.jpg[/IMG]
Attached Images
File Type: jpg py33_.jpg (96.3 KB, 487 views)
Dec 22 '12 #1
2 6550
bvdet
2,851 Expert Mod 2GB
xlrd does not support Python 3+. You might try xlrd3.
Dec 22 '12 #2
gesqo
7
@bvdet
I did.But it messes (xlrd3 doesn't arrive to install with "python setup.py install --prefix=c:\python33")
Dec 22 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Robin Becker | last post: by
12 posts views Thread by kath | last post: by
2 posts views Thread by kylancal | last post: by
1 post views Thread by JYOUNG79 | last post: by
3 posts views Thread by Chanman | last post: by
1 post views Thread by Edwin.Madari | last post: by
2 posts views Thread by patrick.waldo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.