importing xlwings module into python 3.4

2019-02-23 08:07发布

I'm trying to use the new excel integration module xlwings It works like a charm under Anaconda 2.0 for python 2.7 but I'm getting this error under Anaconda 2.0 for python 3.4 the xlwings file does contain class Workbook so I don't understand why it can't import it when I simply use the xlwings file in my project for 3.4 it works just fine

File "C:\Users\xxxxx\AppData\Local\Continuum\Anaconda3\lib\site-packages\xlwings__init__.py", line 1, in from xlwings import Workbook, Range, Chart, version

ImportError: cannot import name 'Workbook'

1条回答
我只想做你的唯一
2楼-- · 2019-02-23 08:35

In "C:\Users\xxxxx\AppData\Local\Continuum\Anaconda3\lib\site-packages\xlwings__init__.py"

Try changing from xlwings import Workbook, Range, Chart, __version__

to from xlwings.xlwings import Workbook, Range, Chart, __version__

查看更多
登录 后发表回答