Learning/Python

VSC Jupyter notebook Kernel Error

usefuLake 2023. 7. 20. 00:44

Python 공부를 하면서 필요한 패키지들을 다운로드 받고 실행을 하다가

어느 순간부터인가 Jupyter notebook을 실행시 Kernel failed Error 가 발생하기 시작했다.

 

1. "여기"를 클릭한 결과

Failure to start kernel due to failures in importing modules from files · microsoft/vscode-jupyter Wiki · GitHub

 

Failure to start kernel due to failures in importing modules from files

VS Code Jupyter extension. Contribute to microsoft/vscode-jupyter development by creating an account on GitHub.

github.com

  1. User code가 built-in module을 override 하지 않도록 해야한다.
  2. pytprocess, ipykernel, pyzmq와 같은 모듈들을 설치해봐야 한다.
    → 이미 설치된 경우, 올바르게 설치되어 있는지 확인.

    → pip 사용하여 재설치.

패키지들을 다시 재설치해봤지만, 문제가 해결되지 않음.

 

2. 출력 확인 결과

ImportError 발생. asttokens의 __init__.py 에서 ASTText를 import 할 수 없다는 에러.

 

3. asttokens의 __init__.py 확인 결과

ASTText 내용이 존재하지 않음.

여러 글들을 참조하다보니 ImportError 발생시 pip를 통해 jupyter notebook 설치를 하라는 댓글들을 참조했다.

 

4. pip install jupyter notebook

asttokens update log
asttokens __init__.py

asttokens package update를 통해서 ASTText import를 확인하였다.

정상적으로 jupyter notebook이 동작하는 것을 확인했다.

'Learning > Python' 카테고리의 다른 글

Tensorflow - InternalError  (0) 2020.08.07