반응형
문제상황
Day2.ipynb이라는 주피터 노트북 파일을 열었을 때
out of memory 라는 오류가 나와 열리지 않는다.
![[Python] 주피터 노트북 out of memory 오류 해결 방법 - undefined - 문제상황 [Python] 주피터 노트북 out of memory 오류 해결 방법 - undefined - 문제상황](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
해결방법
![[Python] 주피터 노트북 out of memory 오류 해결 방법 - undefined - 해결방법 [Python] 주피터 노트북 out of memory 오류 해결 방법 - undefined - 해결방법](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
터미널 열기
기본 경로는 아래와 같다.
필자는 따로 경로 설정은 하지 않고, Day2.ipynb 파일을 여기로 복사하였다.
![[Python] 주피터 노트북 out of memory 오류 해결 방법 - undefined - 해결방법 [Python] 주피터 노트북 out of memory 오류 해결 방법 - undefined - 해결방법](https://blog.kakaocdn.net/dn/dkUnFm/btsDxU2UoaA/uMQ5qKGITqPG7pzHaThhe0/img.png)
아래 코드를 입력하여 기존의 파일을 다른이름으로 저장해주자.
nbconvert 뒤에는 원래의 파일 이름을,
output 뒤에는 새로운 파일 이름을 지정한다.
jupyter nbconvert Day2.ipynb --to notebook --ClearOutputPreprocessor.enabled=True -- output Day2_.ipynb
그러면 아래와 같이 새로운 파일이 생성되며, 잘 열린다.
![[Python] 주피터 노트북 out of memory 오류 해결 방법 - undefined - 해결방법 [Python] 주피터 노트북 out of memory 오류 해결 방법 - undefined - 해결방법](https://blog.kakaocdn.net/dn/Ec37B/btsDAkNhGlV/jovHEcQQJP4OVDNkpWgc8K/img.png)
반응형
'🖥️ IT, 컴퓨터 > 🐍 Python' 카테고리의 다른 글
[Python] 주피터 노트북 코딩 글꼴 바꾸기 (0) | 2024.01.17 |
---|---|
[Python] 파이썬 *args와 **kwargs (0) | 2024.01.17 |
[Python] 재귀함수(Recursion) (0) | 2024.01.17 |
[Python] 문자를 특정 단어로 나누는 경우 : split 함수 (0) | 2024.01.16 |
[Python] 특정 문자의 위치 찾기 : find 함수 (0) | 2024.01.16 |
댓글