当试图progressbar在OSX El Capitan上安装python包时,我收到以下错误:
Collecting progressbar
Using cached progressbar-2.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/var/folders/9s/b1jly7yd0jq639plvkzdvn4m0000gn/T/pip-build-xhfxywsw/progressbar/setup.py", line 5, in <module>
import progressbar
File "/private/var/folders/9s/b1jly7yd0jq639plvkzdvn4m0000gn/T/pip-build-xhfxywsw/progressbar/progressbar/__init__.py", line 59, in <module>
from progressbar.widgets import *
File "/private/var/folders/9s/b1jly7yd0jq639plvkzdvn4m0000gn/T/pip-build-xhfxywsw/progressbar/progressbar/widgets.py", line 121, in <module>
class FileTransferSpeed(Widget):
File "/Users/<USERNAME>/anaconda/lib/python3.4/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 /private/var/folders/9s/b1jly7yd0jq639plvkzdvn4m0000gn/T/pip-build-xhfxywsw/progressbar
Run Code Online (Sandbox Code Playgroud)
更新以下内容并没有解决我的问题
pip install --upgrade setuptools
pip install --upgrade Distribute
Run Code Online (Sandbox Code Playgroud)
我怎么解决这个问题?
fav*_*tti 16
原始软件包不适用于python3,但是,有一个fork,你可以从https://github.com/coagulant/progressbar-python3.git克隆它并运行
python3 setup.py install
Run Code Online (Sandbox Code Playgroud)
但是,我不会检查功能本身是否有效,所以YMMV,但它至少安装:)
[编辑]
更新@shadi 2017年1月30日:关于progressbar的github repo的第28期说要使用pip3 install progressbar33,谢谢!