Python错误集锦:python: can’t open file ‘hello’: [Errno 2] No such file or directory
错误提示:
在命令行输入python py文件名称,提示:python: can’t open file ‘hello’: [Errno 2] No such file or directory
D:\juzicode>python hello
python: can't open file 'hello': [Errno 2] No such file or directory
可能原因:
1、本意是要用python运行hello.py文件,少写了后缀,所以提示不能打开hello文件:
2、如果输入python hello.py 仍提示一样的内容,需要确认下hello.py是否在当前目录下,下图所示的当前目录是指D:\juzicode。
解决方法:
1、如果少写了.py后缀,输入完整的文件名称:python hello.py
2、查找hello.py文件的目录,在cmd命令行切换到py文件的目录下再运行python hello.py
Python错误集锦:python: can’t open file ‘hello’: [Errno 2] No such file or directory相关推荐
- python错误tensorflow.python.framework.errors_impl.InvalidArgumentError Assign requires shapes of both
python 错误tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of bot ...
- D:\anaconda3\envs\py2\python.exe: can‘t open file ‘create‘: [Errno 2] No such file or directory
刚下载Anaconda3,然后使用conda create --name py2 python=2.7 命令创建了一个pyhone2.7的虚拟环境,然后配置PyCharmd的时候报错! 然后网上一直 ...
- 配置远程运行后提示,/usr/bin/python: can‘t open file ‘xxxx‘: [Errno 2] No such file or directory
这个就很奇怪,明明解释器.tools->Deployment都配置好了,并且检查远程和本地两边的目录都有文件,为什么还会出现这个错误呢??? 其实是这样的,在Settings->Proje ...
- 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 ...
- Python错误集锦:matplotlib legend提示:ValueError: Unrecognized location ‘upper’. Valid locations are
原文链接:http://www.juzicode.com/archives/2486 错误提示: 使用matplotlib legend提示:ValueError: Unrecognized loca ...
- Python错误集锦:打开文件路径提示参数无效,OSError: [Errno 22] Invalid argument: ‘D:\juzicode\桔子code\readme.txt’
原文链接:http://www.juzicode.com/archives/2493 错误提示: 打开文件路径提示参数无效:OSError: [Errno 22] Invalid argument: ...
- Python错误集锦:pandas读取excel提示ImportError: Missing optional dependency ‘xlrd’.
原文链接:http://www.juzicode.com/archives/3125 错误提示: 用pandas read_excel()方法读取xls或xlsx文件时,提示:ImportError: ...
- Python错误集锦:pandas绘制多个子图时报错:AttributeError: ‘list’ object has no attribute ‘get_figure’
原文链接:http://www.juzicode.com/archives/3273 错误提示: 利用pandas绘制多个子图时报错:AttributeError: 'list' object has ...
- Add Python Interpreter 报错 Error code:2. XX can‘t open file XX [Errno 2] No such file or directory
刚下载Anaconda3,用conda create -n spytorch python=3.9命令创建了一个名为spytorch的虚拟环境:然后又下载了pycharm,结果往pycharm里配置时 ...
最新文章
- 【Python】轻松识别文字,这款Python OCR库支持超过80种语言
- 数学故事中的「蛋」和「母鸡」
- Knockout应用开发指南 第八章:简单应用举例(1)
- NLP多任务学习:一种层次增长的神经网络结构 | PaperDaily #16
- java思考笔记——遍历Map-key的几种方法
- super构造方法为什么给子类赋值_【Java学习 | Javase】super
- [手把手教]discuzX2插件制作教程__最菜鸟级别的入门坎 【三】
- PHP 判断点是否在多边形内
- deeplin显示安装空间不够_电视内存不够怎么办?一步到位来搞定
- 矿机 矿场 矿池 关系和区别
- Nfine框架基本使用--初学者的总结
- 手电筒安卓_王思聪吃热狗数字时钟app安卓android苹果ios
- 1. javascript 引擎Rhino源代码分析 简介
- 百度地图根据缩放级别显示不同的marker点和窗口内容
- window server 2016 中添加ISCSI硬盘
- Matlab R2017b 自动驾驶工具箱学习笔记(3)_Tutorials_Forward Collision Warning Using Sensor Fusion
- SCA-IOT2050 连接至阿里云IOT平台,并通过阿里云IOT控制PLC
- 嵌入式Linux开发8——UART串口通讯
- Qt之QListWidget控件的应用
- iOS Apple Pay开发流程
热门文章
- 出现java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher问题的解决办法
- css中去掉列表ul中的圆点
- Linux中修改静态IP
- Adobe Dreamweaver CS6 绿色版
- 关于C++二维数组及指针的整理
- Marketing™Series用户手册(Marketing™Series Manual)
- 2022年电工(初级)考试题库及在线模拟考试
- 【信号处理】一种热电偶信号处理算法
- Qt模仿学习通网页部分页面
- ubuntu下安装pwndbg、gef、peda