본문 바로가기

hacking or software engineering skills/etc

ImportError: IProgress not found. jupyter lab tqdm, notebook tqdm 에러 문제

반응형

jupyter lab을 쓰는데 tqdm이 이상하게 자꾸 줄 바뀜이 일어난다.

그래서 찾아보니

stackoverflow.com/questions/23113494/double-progress-bar-in-python

 

Double Progress Bar in Python

Is there a way to create a double progress bar in Python? I want to run two loops inside each other. For each loop I want to have a progress bar. My program looks like: import time for i1 in range...

stackoverflow.com

여기에 enlighten 함수는 jupyterlab에 안 먹혔음

그래서 form tqdm.notebook import tqdm을 써서 하려함

그런데 아래와 같은 문제 발생

ImportError: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html

 

Installation — Jupyter Widgets 7.6.2 documentation

In most cases, installing the Python ipywidgets package will also automatically configure classic Jupyter Notebook and JupyterLab 3.0 to display ipywidgets. With pip, do: Installing in classic Jupyter Notebook Most of the time, installing ipywidgets automa

ipywidgets.readthedocs.io

찾아보니 conda + jupyterlab 사용자의 경우 아래와 같이 ipywidgets을 설치해야 한다.

conda install -n base -c conda-forge jupyterlab_widgets
conda install -n py36 -c conda-forge ipywidgets

여기서 py36은 각자의 가상환경 이름으로 입력한다.

입력하면 jupyterlab_widgets이 설치 된다.

그래도 문제가 발생 추가적인 조치가 필요하다.

#usual installation 
pip install ipywidgets 
jupyter nbextension enable --py widgetsnbextension
#you are my saver!
jupyter labextension install @jupyter-widgets/jupyterlab-manager

이렇게하면? 그대로문제..

from tqdm import tqdm_notebook

from tqdm import tqdm_notebook

 

이래도 문제...

github.com/tqdm/tqdm/issues/394

 

Jupyterlab and tqdm_notebook · Issue #394 · tqdm/tqdm

The following code errors out with, NameError: name 'IntProgress' is not defined import tqdm tqdm.tqdm_notebook().pandas() df.progress_apply(func, axis=1) I imported ipywidgets.IntProgress ...

github.com

 

구원자???

ipywidgets.readthedocs.io/en/latest/user_install.html#installing-the-jupyterlab-extension

 

Installation — Jupyter Widgets 7.5.1 documentation

With pip pip install ipywidgets jupyter nbextension enable --py widgetsnbextension When using virtualenv and working in an activated virtual environment, the --sys-prefix option may be required to enable the extension and keep the environment isolated (i.e

ipywidgets.readthedocs.io

nodejs를 설치하고 labextension을 설치해준다.

그래도 안된다.

 

conda install -c conda-forge ipywidgets

pip install --upgrade jupyter_client

 

해결 방법

위에 설치후 jupyter lab 서버를 껏다가 킨다....!!

반응형