我在Jupyter笔记本中使用tqdm库。通常我会看到一个白色背景上的绿色进度条。但是现在我看到一个粉色背景上的黑色进度条:
import tqdm, tqdm.notebook
from time import sleep
# first progress bar
for i in tqdm.notebook.tqdm(range(10)):
sleep(.1)
# second progress bar
for i in tqdm.notebook.tqdm(range(10)):
sleep(.1)
# third progress bar
for i in tqdm.tqdm(range(10)):
sleep(.1)
# fourth progress bar
for i in tqdm.tqdm(range(10), colour='green'):
sleep(.1)
生成了以下这四个进度条:
我想要的是一个绿色的进度条,没有粉色的背景。
在安装 PyQt5 后出现了这种行为变化。尽管我已经卸载了它,但行为仍然存在。
此外,我之前在笔记本中使用 tqdm.notebook.tqdm
进行进度条显示。现在该函数不再显示进度条(1和2号进度条)。我需要使用 tqdm.tqdm
(3和4号进度条)。
我认为这个问题与后端有关。