个人博客 地址:http://www.wenhaofan.com/article/20180618180327

>>> print "hello" SyntaxError: Missing parentheses in call to 'print'

在环境搭建章节中的路径下载了最新的Python安装包并完成安装后,在cmd窗口执行菜鸟教程第一个 Python 程序中的代码:print "Hello, Python!";提示“>>> print "hello" SyntaxError: Missing parentheses in call to 'print'” 。

原因为该教程实例基于python2.7版本,但是python官网最新的版本已经为3.x。而在python3.x中已经取消了print语句,加入了print()函数来执行输出。

所以在3.x版本中打印Hello,Python应该由print “Hello,Python”; 修改为 print (“Hello,Python”);

菜鸟教程 Missing parentheses in call to 'print'的更多相关文章

  1. python 错误之SyntaxError: Missing parentheses in call to 'print'

    SyntaxError: Missing parentheses in call to 'print' 由于python的版本差异,造成的错误. python2: print "hello ...

  2. SyntaxError: Missing parentheses in call to 'print'

    C:\Users\konglb>python Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 17:26:49) [MSC v.1900 32 bit (I ...

  3. 【PYTHON】 Missing parentheses in call to 'print'

    Microsoft Windows [版本 10.0.15063] (c) 2017 Microsoft Corporation.保留所有权利. C:\Users\Jam>python Pyth ...

  4. SyntaxError: Missing parentheses in call to 'print' 这个错误原因是Python版本问题

    问题 print "www.baidu.com"           Python2 print ("www.baidu.com")     Python3 出 ...

  5. Python3.x运行Python2.x代码报错 syntax error "Missing parentheses in call to 'print'

    #另外一种错误 SyntaxError: Missing parentheses in call to 'print'. Did you mean print( 查看代码,格式如下: print &q ...

  6. Python SyntaxError: Missing parentheses in call to 'print'

    下面的代码 print "hello world" 会出现下面的错误 SyntaxError: Missing parentheses in call to 'print' 因为写 ...

  7. 错误:SyntaxError: Missing parentheses in call to 'print'

    1.Python3编译器使用print函数需加括弧 print(XXX) 而Python 2可以print XXX 2.Python3表示不等只能用"!=" 3.在python3中 ...

  8. Missing parentheses in call to 'print'

    这个消息的意思是你正在试图用python3.x来运行一个只用于python2.x版本的python脚本. print"Hello world" 上面的语法在python3中是错误的 ...

  9. 【python系列】SyntaxError:Missing parentheses in call to 'print'

    打印python2和python3的区别 如上图所示,我的 PyCharm安装的是python3.6如果使用print 10会出现语法错误,这是python2.x和python3.x的区别所导致的.

随机推荐

  1. ViewPager调用notifyDataSetChanged() 刷新问题解决方案

    一.问题来由 ViewPager控件很大程度上满足了开发者开发页面左右移动切换的功能,使用非常方便.但是使用中发现,在删除或者修改数据的时候,PagerAdapter无法像BaseAdapter那样仅 ...

  2. 查询MS SQL的版本号

    可以使用全局变量@@VERSION或者是使用SERVERPROPERTY()函数: 参考: SELECT @@VERSION SELECT SERVERPROPERTY('Edition') Sour ...

  3. 常用类String的总结

    /* String:字符串,使用一对""引起来表示. 1.String声明为final的,不可被继承 2.String实现了Serializable接口:表示字符串是支持序列化的. ...

  4. css的核心原理分为优先级原则与继承原则两大部分

    css原理:1.优先原则=>后解析的内容会覆盖之前解析的内容(所谓解析就是读取的css样式)2.继承原则=>嵌套里面的标签拥有外部标签的某些样式,子元素可以继承父元素的属性 1>优先 ...

  5. 微服务SpringCloud(一)

    Spring Cloud微服务(一) 什么是Spring Cloud 简单来说,Spring Cloud是一个微服务框架的规范,注意,只是规范,他不是任何具体的框架.Spring Cloud 为最常见 ...

  6. Windows通过DOS命令行设置IP地址

    @rem 设置固定IP地址netsh interface ip set address "本地连接" static 192.168.1.200 255.255.255.0 192. ...

  7. Selenium实战(五)——HTML测试报告

    一.概览下载与安装 HTMLTestRunner是unittest的一个扩展,可以生成易于使用的HTML测试报告.HTMLTestRunner是在BSD许可证下发布的. 下载地址:http://tun ...

  8. (转)java 多线程 对象锁&类锁

    转自:http://blog.csdn.net/u013142781/article/details/51697672 最近工作有用到一些多线程的东西,之前吧,有用到synchronized同步块,不 ...

  9. ES6基础与解构赋值(高颜值弹框小案例!)

    let只作用在当前块级作用域内使用let或者const声明的变量,不能再被重新声明let不存在`变量提升` console.log(dad); var dad = '我是爸爸!';//预定义undef ...

  10. 写Blog的准备工作Window Live Writer

    以下是博客园的帮助博客: Windows Live Writer配置步骤 感觉里面的几篇推荐文档都可以看一下,至于代码高亮插件,个人选择的还是SyntaxHighlighter. 一. 关于写blog ...