from lines import lines
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import lines
ImportError: No module named lines
这取自this Pycha 的例子。如何安装此模块?
最佳答案
lines.py
模块是 Pycha 示例的一部分。您可以找到该模块的副本 in that directory .
要正确遵循该示例,您应该调用 examples/barchart.py
示例,同时仍保留 examples
目录的其余部分。然后它将起作用。
如果您想根据示例创建自己的脚本,则必须用您自己的代码/数据替换该模块。
关于python - 导入错误:没有名为行的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7915490/