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.
字節跳動21屆秋招運營兩輪面試經驗分享
2.
Java 3 年,25K 多嗎?
3.
mysql安裝部署
4.
web前端開發中父鏈和子鏈方式實現通信
5.
3.1.6 spark體系之分佈式計算-scala編程-scala中trait特性
6.
dataframe2
7.
ThinkFree在線
8.
在線畫圖
9.
devtools熱部署
10.
編譯和鏈接
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<