python包:tqdm
进度条 tqdm
库比较热门,声称比老版的 python-progressbar
库的单次响应时间提高了 10 倍以上。
其实进度条的原理十分的简单,无非就是在 shell 中不断重写当前输出。
使用大陆镜像 安装即可
D:\whl\torchvision>pip install tqdm -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting tqdm
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2a/14/e75e52d521442e2fcc9f1df3c5e456aead034203d4797867980de558ab34/tqdm-4.66.2-py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.3/78.3 kB 4.3 MB/s eta 0:00:00
Collecting some-package
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e7/a2/d318a685319c3801db1ae0002fc8e095663a55546c62a6e30d9d0fc3289b/some-package-0.1.zip (2.8 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Collecting colorama (from tqdm)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Building wheels for collected packages: some-package
Building wheel for some-package (pyproject.toml) ... done
Created wheel for some-package: filename=some_package-0.1-py3-none-any.whl size=1434 sha256=9c155d81dd612b3cc9c6314a7ea9799522ddcee1720e158b34d79b1ba526ee7f
Stored in directory: c:\users\ai\appdata\local\pip\cache\wheels\6c\4c\40\23255e2c09d2f0b1b219880055052bb65b621d895ef3a676f0
Successfully built some-package
Installing collected packages: some-package, colorama, tqdm
Successfully installed colorama-0.4.6 some-package-0.1 tqdm-4.66.2
D:\whl\torchvision>