最近开始学习了“笨方法学python”,在练习的第一个程序就出现了如下错误:
C:\Python27\python.exe: can’t open file ‘2.py’: [Errno 2] No such file or directory。

刚开始自己找了好长时间,也在网上查阅了好多资料,都没能解决,最后发觉原来是自己新建的xxx.py文件并不是像我们看到的是.py后缀的,它的后面有两层后缀,xxx.py.txt其中.txt的后缀隐藏了我们有时候会看不到。这时候在Dos界面输入dir 查看自己新建的.py文件所在文件夹下所有的文件以及文件类型,确保文件确实是.py结尾的。

C:\Python27\python.exe: can't open file '2.py': [Errno 2] No such file or directory相关推荐

  1. python Django创建数据库时can't open file 'manage.py': [Errno 2] No such file or directory

    1.在学习Diango新建项目后,进行创建数据库的时候,使用以下命令: python manage.py migrate 2.发现竟然报can't open file 'manage.py': [Er ...

  2. 服务器 python cant open file_python: can't open file 'h.py': [Errno 2] No such file or directory

    这是在写第一个程序时就遇到的问题: python: can't open file 'h.py': [Errno 2] No such file or directory 我建了一个文件夹,命名为&q ...

  3. keras跑yolov3模型报错1“python3: can't open file 'convert.py': [Errno 2] No such file or directory”解决

    刚开始学yolo和keras,跑github上模型 https://github.com/qqwweee/keras-yolo3 一开始遇到问题,让运行"python convert.py ...

  4. 创建数据库python: can‘t open file ‘manage.py‘: [Errno 2] No such file or directory报错

    https://blog.csdn.net/hanhanwanghaha宝藏女孩 欢迎您的关注! 欢迎关注微信公众号:宝藏女孩的成长日记 如有转载,请注明出处(如不注明,盗者必究) 在创建数据库时运行 ...

  5. Can‘t find Python executable “c:\Python27\python.exe“, you can set the PYTHON env variable.

    在使用npm安装软件的时候,报以下错误: npm ERR! gyp verb could not find "c:\Python27\python.exe". checking p ...

  6. /root/miniconda3/bin/python: can‘t open file ‘/root/autodl-tmp/train.py‘: [Errno 2] No such file

    在使用SSH连接autodl服务器时,有时在选择train后,会报出 /root/miniconda3/bin/python: can't open file '/root/autodl-tmp/mi ...

  7. 安装Node-sass的时候,报ensuring that file exists: C:\Python27\python.exe

    在安装Node-sass时需要使用Python 2.7.x,但是找不到Python 2.7.x的安装路径所致.解决方法是:运行以下命令,将Python 2.7.x的安装路径配置到npm配置中 npm ...

  8. python: can‘t open file ‘C:\Users\Lenovo\snow.py‘: [Errno 2] No such file or directory解决方案

    命令行调用snow.py时出现如上问题, can't open file 'C:\Users\Lenovo\snow.py'即这个路径下没有这个文件,那就写这个文件的路径呗! 诶,成了!

  9. jenkins 构建提示 can‘t open file xxxx [Errno 2] No such file or directory

    在windows环境中使用jenkins构建python脚本运行失败 检查控制台提示:python: can't open file 'run_all_case.py': [Errno 2] No s ...

最新文章

  1. Intel x86架构之多处理器与APIC
  2. Google总裁:未来互联网要消失!物联网将无处不在。
  3. python3.4.4怎么用_python3.4使用文件
  4. appcon 图标打包
  5. python中dump用法_python中json庫中的load、loads、dump、dumps的區別與用法
  6. 前端学习(2321):angular环境搭建1
  7. TCP局域网 通讯 的消息发送
  8. java inireader_用Java读取INI文件(带section的)
  9. 接口测试和性能测试的区别
  10. mysql 并发_MySQL的并发控制与加锁分析
  11. 笔记本计算机被限制无法上网,电脑上网受限制或无法连接怎么办 电脑上网受限制或无法连接的解决方法...
  12. 计算机有哪些交叉专业研究生,与理工科交叉的计算机专业考研方向有哪些?
  13. linux 查看 man 路径配置文件 man.config,linux中的man(zz)
  14. 武汉流星汇聚:跨境电商的未来是跨境电商和区块链技术相结合
  15. 【现控理论】(一、系统的传递函数矩阵)----学习笔记
  16. 我是如何通过系统架构设计师考试的(2017年软考)
  17. 解决U盘空间足够,储存是却是文件过大
  18. 用python绘制一朵玫瑰花送给心上人
  19. java实现复制excel模板(多个工作表)并下载的代码
  20. 【综述】情感计算的“前世今生”

热门文章

  1. 10 分钟从零搭建个人博客
  2. c语言编制编程语言,C语言CGI编程入门(一)
  3. lisp语言画阿基米德线_孩子总说“我不会画”!那么孩子是否要先学画形象?...
  4. linux如何开启sni服务,Nginx开启单IP多SSL证书支持-TLS SNI support
  5. mysql all 授权_mysql给数据库授权 GRANT ALL PRIVILEGES ON
  6. 集群资源分配_分析下 Node.js 关于集群的那些事
  7. MySQL验证索引提升查询效率
  8. Java 网关-Servlet Gateway
  9. 通过一个图来简单描述一下 socket 链接建立以及通信的模型
  10. SpringMVC异常处理机制-异常处理的思路