问题描述
当尝试在OSX El Capitan上安装python软件包progressbar
时,出现以下错误:
When trying to install the python package progressbar
on OSX El Capitan, I get the following error:
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
更新以下内容不能解决我的问题
Updating the following did not solve my problem
pip install --upgrade setuptools
pip install --upgrade Distribute
我该如何解决?
推荐答案
原始程序包不适用于python3,但是有一个fork可以从 https://github.com/凝固剂/progressbar-python3.git 并运行
The original package does not work with python3, however, there's a fork that does, you can clone it from https://github.com/coagulant/progressbar-python3.git and run
python3 setup.py install
但是,我没有检查该功能本身是否有效,因此YMMV至少会安装:)
I dind't, however, check whether the functionality works per se, so YMMV, but it installs at least :)
由@shadi于2017年1月30日更新:问题28 在Progressbar的github存储库上说要使用pip3 install progressbar33
,谢谢!
Update by @shadi 30 Jan 2017: Issue 28 on progressbar's github repo says to use pip3 install progressbar33
,thanks!
这篇关于pip安装失败,并在__slots__中出现"ValueError:'format'与类变量冲突";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!