By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,571 Members | 960 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,571 IT Pros & Developers. It's quick & easy.

xlrd in python 3.3

gesqo
P: 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, 422 views)
Dec 22 '12 #1
Share this Question
Share on Google+
2 Replies

bvdet
Expert Mod 2.5K+
P: 2,851
xlrd does not support Python 3+. You might try xlrd3.
Dec 22 '12 #2

gesqo
P: 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.