ImportError: No module named xlsxwriter

前端 未结 6 1399
遥遥无期
遥遥无期 2020-12-06 09:45

I recently downloaded the xlsxwriter version 0.6.4 and installed it on my computer. It correctly added it to my C:\\Python27\\Lib\\site-packages\\xlsxwri

6条回答
  •  盖世英雄少女心
    2020-12-06 10:09

    Even if it looks like the module is installed, as far as Python is concerned it isn't since it throws that exception.

    Try installing the module again using one of the installation methods shown in the XlsxWriter docs and look out for any installation errors.

    If there are none then run a sample program like the following:

    import xlsxwriter
    
    workbook = xlsxwriter.Workbook('hello.xlsx')
    worksheet = workbook.add_worksheet()
    
    worksheet.write('A1', 'Hello world')
    
    workbook.close()
    

提交回复
热议问题