2019. 5. 31. 15:44 나의일 관련/Linux
python 3 "NameError: name 'file' is not defined "
- 오류 내용 : NameError: name 'file' is not defined
- 오류 원인 및 해결 방법 :
python 2.x 버전에서 사용하던 file() 은 삭제 되었습니다.
Python 3 버전에서는 file() 대신 open(filename, mode)을 사용하세요.
- 참고 : https://docs.python.org/release/3.0/whatsnew/3.0.html#builtins
https://docs.python.org/release/3.0/library/functions.html#open
'나의일 관련 > Linux' 카테고리의 다른 글
anydesk 간단 설치 및 설정 (0) | 2019.10.31 |
---|---|
[Perl 오류] "all" is not exported by the List::Util module (0) | 2019.10.17 |
MAC XQuartz GLX 오류 해결 기록 (0) | 2019.01.22 |
antlr-2.7.7 설치 기록 (0) | 2019.01.08 |
gcc-6.1.0 설치 기록 (0) | 2018.07.19 |