2017-02-13 76 views
1

当我尝试plotly使用Python 2.7版,我得到一个AttributeError。plotly - 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' 

所以,我想这一点:

pip install tools 

它给了我一个错误:Failed building wheel for lxml。所以我刚刚安装了一个.whl文件

pip install lxml-3.6.0-cp27-none-win32.whl 

之后,我能够安装工具模块。然而,AttributeError错误仍然存​​在,不会让我plotly使用。

此外,我尝试使用设置一个虚拟环境,然后积极使用 - 我得到同样的错误。

+0

你能告诉你怎么做你的进口? – Kruser

+0

从运行IPython的后命令行 – vaka

回答

0

修复它......我只需要删除主目录下的plotly.pyc文件。不知道它是什么,它是如何到达那里,但它似乎格格不入,所以我删除它和它的工作!

相关问题