"许可" xlrd找不到模块

时间:2015-04-04 00:47:25

标签: python-3.x xlrd xlutils

我已经安装了xlutils,我正在尝试以下代码:

from xlrd import open_workbook

input_file = open_workbook('DataTestFile.xlsx')

for s in input_file.sheets():
    print('Sheet:',s.name)
    for row in range(s.nrows):
        values = []
        for col in range(s.ncols):
            values.append(s.cell(row,col).value)
        print(','.join(values))
    print()

(根据教程书here

我收到错误消息,表明找不到许可证模块:

Traceback (most recent call last):
  File "C:\Users\xxxxxxx\workspace_python\xxxxxxx\TestPack\test_file_excel.py", line 7, in <module>
    from xlrd import open_workbook
  File "C:\Python34\lib\site-packages\xlrd\__init__.py", line 9, in <module>
    import licences
ImportError: No module named 'licences'

但是,我可以确认文件licences.py与上面引用的文件_ init _.py存在于同一文件夹中:

files in my xlrd folder

为什么它不被识别?

0 个答案:

没有答案