디버깅 노트

[Python] 인터프리터 문제, 빌트인 모듈 간섭 문제

몽글이2 2023. 8. 16. 14:07

The file 'private_repo/private/code/ml/decorator.py' seems to be overriding built in modules and interfering with the startup of the kernel. Consider renaming the file and starting the kernel again.Click here for more info.

 

문제 상황 :

decorator 실습을 위해 decorator를 활용하여 로그를 남기는 python file 생성후 python 파일 실행

python decorator.py

실행 이후 주피터 노트북 파일을 실행하니 위의 오류로 kernel이 실행되지 않는 문제 

 

 

원인:

python의 built in module중 decorator와 겹치는 파일이 있어 문제가 되는 것으로 보임

 

해결 방법:

decorator.py 파일 이름을 decorator_example.py로 변경 후 문제 해결

 

refer :

(1) chat-gpt.. ^^

(2) Failure to start Kernel due to built in modules being overridden by user code · microsoft/vscode-jupyter Wiki (github.com)

 

Failure to start Kernel due to built in modules being overridden by user code

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

github.com