【发布时间】:2020-04-14 20:53:47
【问题描述】:
我刚刚安装了 Tensorflow 并尝试打印我安装的版本。
import tensorflow as tf
print(tf.__version__)
当我收到这个“错误”时:
Module 'tensorflow' has no '__version__' member pylint (no-member)
我说错误是因为它将2.0.0 打印到终端,但 VSCode 仍然说文件中有错误。我认为这可能是 linter 的问题,但我已经安装了 pylint,这就是 TF recommends。
关于如何修复此错误的任何想法?在添加参数以禁用类似的错误之前,我希望知道是什么原因造成的。
【问题讨论】:
-
对this有帮助吗,版本号是多少?
-
版本为 2.0.0
标签: python tensorflow visual-studio-code pylint