[ 오류 해결 ] ipywidgets javascript error
반응형
Jupyter Notebook에서 인터렉티브(interactive) 기능을 사용하기 위해 Ipywidgets 패키지를 사용합니다.
import ipywidgets as widgets
widgets.IntSlider()
widget을 수행하면 코드 셀 아래 출력 영역 안에 표시가 되어야 하지만 Clik to show javascript error. 가 발생하는 경우가 있습니다.
[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'IntSliderModel' from module '@jupyter-widgets/controls'
Error: Module @jupyter-widgets/controls, version ^1.5.0 is not registered, however, 2.0.0 is
at f.loadClass (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.083e6b37f2f7b2f04b5e.js?v=083e6b37f2f7b2f04b5e:1:74976)
at f.loadModelClass (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:10721)
at f._make_model (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:7517)
at f.new_model (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:5137)
at f.handle_comm_open (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:3894)
at _handleCommOpen (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.083e6b37f2f7b2f04b5e.js?v=083e6b37f2f7b2f04b5e:1:73392)
at b._handleCommOpen (http://localhost:8888/static/lab/jlab_core.081dc2b13065c79d8463.js?v=081dc2b13065c79d8463:2:994257)
at async b._handleMessage (http://localhost:8888/static/lab/jlab_core.081dc2b13065c79d8463.js?v=081dc2b13065c79d8463:2:996247)
2022년 8월 18일에 ipywidgets 8.0.0 버전이 Release 되었습니다. 해당 버전은 Widgets 렌더링을 실패하는 문제에 대해 개선 되었습니다. 하지만 종속성 문제로 안될 경우가 있습니다.
저의 환경은 다음과 같이 구성하니 정상적으로 작동합니다.
# python=3.9
pip install jupyterlab==3.2.1
pip install ipywidgets==7.7.0
pip install jupyterlab-widgets==1.0.0
반응형
'Trouble Shooting' 카테고리의 다른 글
댓글
이 글 공유하기
다른 글
-
RuntimeError: MPS does not support cumsum op with int64 input
RuntimeError: MPS does not support cumsum op with int64 input
2023.08.09 -
[ 오류수정 ] AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'?
[ 오류수정 ] AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'?
2023.07.20 -
[ 오류 해결 ] ModuleNotFoundError: No module named 'PIL'
[ 오류 해결 ] ModuleNotFoundError: No module named 'PIL'
2023.02.03 -
[ 오류 해결 ] (googletrans) AttributeError: 'NoneType' object has no attribute 'group'
[ 오류 해결 ] (googletrans) AttributeError: 'NoneType' object has no attribute 'group'
2023.01.26