Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- for
- Class
- control
- XML
- DoM
- computer
- function
- instruction
- mysql
- Java
- CSS
- Algorithm
- MIPS
- system
- javascript
- DB
- web
- Linux
- architecture
- data structure
- DS
- MacOS
- Pipelining
- html
- DATAPATH
- while
- github
- php
- react
- python
Archives
- Today
- Total
YYYEJI
[MacOS] FileNotFoundError: [Errno 2] No such file or directory: 'xxxx.txt' 본문
Python
[MacOS] FileNotFoundError: [Errno 2] No such file or directory: 'xxxx.txt'
YEJI ⍢ 2022. 9. 28. 11:55728x90
파이썬에서 파일을 열 때 발생하는 에러입니다.
Vmware에서 설정되어 있는 작업경로를 기준으로 파일을 찾기 때문에 발생합니다.
제가 해결한 방법은 아래와 같이 파일의 이름을 넣는 것이 아니라
파일의 경로를 입력하는 것입니다.
아래 사진과 같이 경로를 입력해주면 에러가 해결됩니다.
◡̈
'Python' 카테고리의 다른 글
[Python] for문과 while문의 차이점 (2) | 2022.09.29 |
---|---|
[Python] 반복문 (while문) (0) | 2022.09.29 |
[Python] find, startswith, endswith 함수 (0) | 2022.09.26 |
[Python] Enumerate 함수 (0) | 2022.09.26 |
[Python] for문을 이용한 list 값 출력 (0) | 2022.09.26 |