这个问题有很多类型的,这里说下我遇到的这个类型

首先我是获取input 值之后提示NameError: name xx is not defined

最后发现是python 2x 与 python 3x 对获取input 不同问题引起的

写的是在python 3x  , 运行的是在python 2x 中 ,

该问题的避免方法就是输入的时候带上双引号"" 就不出出现这个问题了

或者把 input 改为 raw_input 在python 2x 上面运行

如果是其他类型的问题可以看

https://www.cnblogs.com/zyh19980816/p/11942874.html

NameError: name xx is not defined相关推荐

  1. NameError: name 'XX' is not defined

    举个例子来说明这个问题 在一个函数中, def function2(self):for i in range(m): for j in range(n): m和n都是前面函数的变量,这里没有重新对他们 ...

  2. Python报错:NameError: name ‘wraps‘ is not defined

    @wraps(func) NameError: name 'wraps' is not defined 解决方法: (1)安装functiontools:pip install functiontoo ...

  3. NameError: name 'go' is not defined

    最近在学习fbprophet时,按照安装步骤,搭建好环境之后,使用官方教程进行学习.在执行到下面这句时报错 fig = plot_plotly(m, forecast) # This returns ...

  4. Python 解决 :NameError: name ‘reload‘ is not defined 问题

    Python 解决 :NameError: name 'reload' is not defined 问题 参考文章: (1)Python 解决 :NameError: name 'reload' i ...

  5. 【错误记录】执行 Python 程序报错 ( NameError: name ‘reload‘ is not defined )

    文章目录 一.报错信息 二.解决方案 一.报错信息 在 Windows 的 cmd 命令行运行 python 脚本时 , 报如下错误 : 执行 python ApkTool.py -analyse - ...

  6. py+selenium 报错NameError: name 'NoSuchElementException' is not defined【已解决】

     报错:NameError: name 'NoSuchElementException' is not defined  如图 解决方法: 头部加一句:from selenium.common.exc ...

  7. 成功解决NameError: name ‘norm‘ is not defined

    成功解决NameError: name 'norm' is not defined 目录 解决问题 解决思路 解决方法 解决问题 NameError: name 'norm' is not defin ...

  8. 成功解决NameError: name 'file' is not defined

    成功解决NameError: name 'file' is not defined 目录 解决问题 解决思路 解决方法 解决问题 NameError: name 'file' is not defin ...

  9. 成功解决NameError: name 'apply' is not defined

    成功解决NameError: name 'apply' is not defined 目录 解决问题 解决思路 解决方法 解决问题 NameError: name 'apply' is not def ...

最新文章

  1. Linux那些事儿 之 戏说USB(24)设备的生命线(七)
  2. 如何看懂一个深度学习的项目代码
  3. at org.apache.coyote.http11.AbstractOutputBuffer.checkLengthBeforeWrite
  4. python浅蓝色对应的代码_浅蓝色Python模块不在m上工作
  5. java web开发基础学习
  6. 【CSS3】CSS3文本相关属性大全
  7. 今天讲个小故事,Javascript诞生记
  8. css实现自适应正方形
  9. LinkedIn庄振运:从国家部委公务员到硅谷系统性能专家,创新是唯一主旋律
  10. 基于单片机的表决器(七人)系统设计(#0496)
  11. Spring核心框架体系结构
  12. 读书笔记_金融数据分析 | 金融数据及其特征
  13. 表头顺序不一样的表格如何合并_表头一样的几个excel表怎么合并在一起?
  14. 使用Travis CI进行在线build
  15. Didn't find class ...l on path: DexPathList
  16. vue全家桶都有哪些
  17. Win10无法开机提示自动修复无法修复你的电脑的有效解决方法
  18. staircase nim 经典组合游戏
  19. 「数据科学」数据科学家为什么该学习PostgreSQL
  20. Android N 指纹框架

热门文章

  1. 2022-2028年中国电池制造行业市场供需规模及投资前景预测报告
  2. 2022-2028年中国数字电视产业投资分析及前景预测报告(全卷)
  3. 2022-2028年中国场景金融行业深度调研及投资前景预测报告
  4. RPC 笔记(01)— RPC概念、调用流程、RPC 与 Restful API 区别
  5. Win10家庭版如何启用本地组策略
  6. python常用魔法函数
  7. AIoT开放平台及应用
  8. gst-crypto GStreamer插件
  9. GitHub上YOLOv5开源代码的训练数据定义
  10. 多款激光雷达性能评估