我在maxos中安装了tensorflow+python,参考了一些关于web的资源。 环境pameters:Mac操作系统10.12+python2.7+tensorflow 0.5.0 当我试图打开笔记本时,我发生了这样的错误:
****MacBook:code ****$ python
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ipython notebook
File "<stdin>", line 1
ipython notebook
^
SyntaxError: invalid syntax
>>> print ‘hello'
python[notebook])
当我检查该条款时,结果是:
^{pr2}$当我使用print命令时,结果是:
>>> print "hello"
hello
>>> print(hello)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'hello' is not defined
>>> print("hello")
hello
我找不到解决办法,你能给我一些有用的指导吗,非常感谢。在
命令“ipython notebook”不是在python REPL中执行的,而是在shell中执行的。在
****MacBook:code ****$ ipython notebook
可以。在相关问题 更多 >
编程相关推荐