【问题标题】:Not able to run tflearn无法运行 tflearn
【发布时间】:2017-08-01 16:27:22
【问题描述】:

当我跑步时

    import tflearn

在我的 python3 解释器中。

我收到以下错误。

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/home/abc/app/neural_network/tflearn.py", line 2, in 
    <module>
    from tflearn.layers.conv import conv_2d,max_pool_2d
    ImportError: No module named 'tflearn.layers'; 'tflearn' is not a package

我有 tensorflow 版本 1.2.1,我已经安装了 tflearn。

【问题讨论】:

    标签: tensorflow deep-learning tflearn


    【解决方案1】:

    不要将您的文件命名为与 python 包相同的名称(在本例中为 tflearn),因为 python 将使用您的文件,因为它是一个包,并且所有导入都将失败。

    使用与包同名的脚本将隐藏真正的包(假设已安装)。这就是为什么你会得到这样的错误。

    【讨论】:

    • 谢谢你的工作,那对我来说太粗心了。
    猜你喜欢
    • 2016-12-22
    • 1970-01-01
    • 2017-07-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多