小编jia*_*ang的帖子

AttributeError:模块'tensorflow'没有属性'python'

>import tensorflow

>import tensorflow.contrib

>tensorflow.contrib

module 'tensorflow.contrib' from 'D:\\ProgramData\\Anaconda3\\lib\\site-packages\\tensorflow\\contrib\\__init__.py'

>import tensorflow.python

>tensorflow.python

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'python'
Run Code Online (Sandbox Code Playgroud)

如您所见,我在cmd(win 10)中运行此代码."import tensorflow.contrib"和"import tensorflow.python"都可以,但命令"tensorflow.contrib"和"tensorflow.python"是不同的.一个返回一个目录,另一个返回AttributeError.

有没有人知道为什么?

python attributeerror

8
推荐指数
1
解决办法
9912
查看次数

标签 统计

attributeerror ×1

python ×1