Python 2.7 plotly-AttributeError:&x27;模块';对象没有属性';工具';

Python 2.7 plotly-AttributeError:&x27;模块';对象没有属性';工具';,python-2.7,plotly,Python 2.7,Plotly,当我尝试将plotly用于Python2.7时,我得到了一个AttributeError In [1]: import plotly --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-1-c27a4132ad2

当我尝试将plotly用于Python2.7时,我得到了一个AttributeError

In [1]: import plotly
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-c27a4132ad2e> in <module>()
----> 1 import plotly

c:\projects\flask\plotly.pyc in <module>()

AttributeError: 'module' object has no attribute 'tools'
它给了我一个错误:
为lxml构建控制盘失败
。所以我刚安装了一个.whl文件

pip install lxml-3.6.0-cp27-none-win32.whl
之后,我能够安装工具模块。然而,AttributeError仍然存在,不允许我有计划地使用它


此外,我尝试使用设置虚拟环境,然后使用plotly-我得到相同的错误

修复了它。。。我所要做的就是删除主目录中的plotly.pyc文件。不知道它是做什么用的,它是如何到达那里的,但它似乎不合适,所以我删除了它,它成功了

运行IPython后,可以从命令行演示如何进行导入吗
pip install lxml-3.6.0-cp27-none-win32.whl