JavaShuo
栏目
标签
python3打开文本文件- FileNotFoundError: [Errno 2] No such file or directory:
时间 2020-08-08
标签
python3
python
打开
文本
文件
filenotfounderror
errno
file
directory
栏目
Python
繁體版
原文
原文链接
在Linux或者OS X中,使用绝对路径打开文件的时候应该使用单斜杠/,(如 C:/test.txt)。 python 在Windows中,建议使用双反斜杠(如C:\\test.txt)。windows 建议使用绝对路径;路径过长:能够 先查看当前工做路径;code print('当前工做路径', os.getcwd()) # main.py路径: # D:\ProgramFiles\P
>>阅读原文<<
相关文章
1.
项目部署错误:FileNotFoundError: [Errno 2] No such file or directory: 'manage.py'
2.
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\86188\\data\\rt-polaritydata\\rt
3.
FileNotFoundError: [Errno 2] No such file or directory: 'traingingDigits/0_0.txt'
4.
启动airflow webserver报错:FileNotFoundError: [Errno 2] No such file or directory: 'gunicorn'
5.
FileNotFoundError: [Errno 2] No such file or directory: '.\\cifar-10-batches-py\\data_batch_1'
6.
selenium+webdriver:FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver'
7.
IOError: [Errno 2] No such file or directory
8.
python open打开文件失败 IOError: [Errno 2] No such file or directory: 'E://aaa.txt'
9.
Yum:[Errno 5] [Errno 2] No such file or directory错误
10.
C:\Python27\python.exe: can't open file '2.py': [Errno 2] No such file or directory
更多相关文章...
•
C# 文本文件的读写
-
C#教程
•
XSD 仅含文本
-
XML Schema 教程
•
Docker容器实战(七) - 容器眼光下的文件系统
•
SpringBoot中properties文件不能自动提示解决方法
相关标签/搜索
文本
本文
文件
directory
filenotfounderror
errno
中文文档
文言文
Python
PHP教程
MySQL教程
PHP 7 新特性
文件系统
插件
开发工具
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
【Java8新特性_尚硅谷】P1_P5
2.
SpringSecurity 基础应用
3.
SlowFast Networks for Video Recognition
4.
074-enable-right-click
5.
WindowFocusListener窗体焦点监听器
6.
DNS部署(二)DNS的解析(正向、反向、双向、邮件解析及域名转换)
7.
Java基础(十九)集合(1)集合中主要接口和实现类
8.
浏览器工作原理学习笔记
9.
chrome浏览器构架学习笔记
10.
eclipse引用sun.misc开头的类
本站公众号
欢迎关注本站公众号,获取更多信息
相关文章
1.
项目部署错误:FileNotFoundError: [Errno 2] No such file or directory: 'manage.py'
2.
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\86188\\data\\rt-polaritydata\\rt
3.
FileNotFoundError: [Errno 2] No such file or directory: 'traingingDigits/0_0.txt'
4.
启动airflow webserver报错:FileNotFoundError: [Errno 2] No such file or directory: 'gunicorn'
5.
FileNotFoundError: [Errno 2] No such file or directory: '.\\cifar-10-batches-py\\data_batch_1'
6.
selenium+webdriver:FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver'
7.
IOError: [Errno 2] No such file or directory
8.
python open打开文件失败 IOError: [Errno 2] No such file or directory: 'E://aaa.txt'
9.
Yum:[Errno 5] [Errno 2] No such file or directory错误
10.
C:\Python27\python.exe: can't open file '2.py': [Errno 2] No such file or directory
>>更多相关文章<<