Linux 在Ubuntu上运行Tensorflow时出现语法错误

Linux 在Ubuntu上运行Tensorflow时出现语法错误,linux,ubuntu,machine-learning,tensorflow,deep-learning,Linux,Ubuntu,Machine Learning,Tensorflow,Deep Learning,我已经在Ubuntu上安装了Tensorflow。Wen想要测试Tensorflow,我得到了以下语法错误: VirtualBox:~$ # Python VirtualBox:~$ import tensorflow as tf VirtualBox:~$ hello = tf.constant('Hello, TensorFlow!') bash: syntax error near unexpected token `(' 我在虚拟机上使用ubuntu。如何修复此错误? 我想跟随这个视频

我已经在Ubuntu上安装了Tensorflow。Wen想要测试Tensorflow,我得到了以下语法错误:

VirtualBox:~$ # Python
VirtualBox:~$ import tensorflow as tf
VirtualBox:~$ hello = tf.constant('Hello, TensorFlow!')
bash: syntax error near unexpected token `('
我在虚拟机上使用ubuntu。如何修复此错误? 我想跟随这个视频在Windows上安装Ubuntu:

您没有启动python,bash也不理解您的导入语句。键入python并按enter键(不是python)。然后会出现类似>>>的提示。
现在运行语句导入等等。

为什么要在shell中运行python语句?你不应该在像ipython这样的Python解释器接口中完成吗?我对Linux是新手。我只是想看看这个视频: