简体   繁体   English

python 2.7中的xlwings导入错误:无法导入名称工作簿

[英]xlwings import error in python 2.7: Can't import name Workbook

(I know there is an original question regarding this issue but it differs a bit by having command run in home directory. Also no specific solution is mentioned) (我知道有关此问题有一个原始问题,但通过在主目录中运行命令有所不同。也未提及具体解决方案)

I am using Anaconda2 python 2.7 (64bit) distribution. 我正在使用Anaconda2 python 2.7(64bit)发行版。 I have installed xlwings (version 0.9.3) on it using 我已经使用安装了xlwings(版本0.9.3)

pip install xlwings

Now I am trying to run a very basic command (in Ipython qtconsole): 现在,我正在尝试运行一个非常基本的命令(在Ipython qtconsole中):

from xlwings import Workbook

to which I get error as: 我收到以下错误:

cannot import name workbook

I tried the same with a python script saved in my home directory which gave same error. 我用保存在主目录中的python脚本尝试了同样的操作,该脚本给出了相同的错误。 However following command runs fine: 但是以下命令运行正常:

from xlwings import Range, Chart, __version__

Can anyone point out, what I may be doing wrong? 谁能指出我可能做错了什么?

Workbook已从0.9版本更名为Book ,请参阅迁移指南 ,按照快速入门进行操作,或者只是看一下API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM