它会检查我的 seaborn 东西所在的 lib 文件夹,但仍然出错。_。
嗨,
我看过其他帖子,但大多数似乎都在处理 Jupyter 笔记本,而我不是。我想知道如何在基本的 Python IDE 或 PyCharm 中使用 Seaborn。我读过关于文件路径冲突的内容,但在这方面不太清楚。
我现在正在使用 Python 3.6。
谢谢你的帮助!
app.py定义一个sectors视图,该视图使用 中Sectors定义的类sectors.py。当我访问视图时,我得到一个AttributeError:
sector = sectors.Sectors()
AttributeError: 'function' object has no attribute 'Sectors'
Run Code Online (Sandbox Code Playgroud)
import sectors
@app.route("/sectors")
def sectors():
sector = sectors.Sectors()
return render_template('sectors.html', sector=sector)
Run Code Online (Sandbox Code Playgroud)
我导入了sectors,所以它应该是一个模块,而不是一个函数,它确实已经Sectors定义了。为什么这不起作用?