progressbar可以显示程序运行的进度,我主要用在jupyter notebook里。
在用Anaconda安装progressbar的时候,出现了这样的错误,提示progressbar是Python2.6使用的,Python3.5装不了。
UnsatisfiableError: The following specifications were found to be in conflict:
- progressbar -> python 2.6*
- python 3.5*
Use "conda info <package>" to see the dependencies for each package.
用pip install progressbar
则出现这样的错误:
Collecting progressbar
Using cached https://files.pythonhosted.org/packages/0f/e1/f30b72ecabba259c7c38dd0eb944a173effced3fd7de2c9c2902bd6f649a/progressbar-2.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-i8m36ug8\progressbar\setup.py", line 5, in <module>
import progressbar
File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-i8m36ug8\progressbar\progressbar\__init__.py", line 59, in <module>
from progressbar.widgets import *
File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-i8m36ug8\progressbar\progressbar\widgets.py", line 121, in <module>
class FileTransferSpeed(Widget):
File "C:\Program Files\Anaconda3\lib\abc.py", line 133, in __new__
cls = super().__new__(mcls, name, bases, namespace)
ValueError: 'format' in __slots__ conflicts with class variable
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-i8m36ug8\progressbar\
解决方法
pip install progressbar2