gpt4 book ai didi

python - __slots__ 中的 pip 安装失败,格式为 "ValueError: ' 与类变量冲突”

转载 作者:太空狗 更新时间:2023-10-30 00:25:01 24 4
gpt4 key购买 nike

尝试在 OSX El Capitan 上安装 python 包 progressbar 时,出现以下错误:

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

更新以下并没有解决我的问题

pip install --upgrade setuptools
pip install --upgrade Distribute

我该如何解决?

最佳答案

原始包不适用于 python3,但是,有一个分支可以,您可以从 https://github.com/coagulant/progressbar-python3.git 克隆它并运行

python3 setup.py install

但是,我没有检查该功能本身是否有效,所以 YMMV,但它至少安装了 :)

[编辑]

@shadi 于 2017 年 1 月 30 日更新:Issue 28在 progressbar 的 github repo 上说要使用 pip3 install progressbar33,谢谢!

关于python - __slots__ 中的 pip 安装失败,格式为 "ValueError: ' 与类变量冲突”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33063427/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com