我收到此错误:
E:\opensource_codes\semi-auto-anno\src>pip install progressbar
Collecting progressbar
Downloading 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\mona6\AppData\Local\Temp\pip-build-0_37al8d\progressbar\setup.py", line 5, in <module>
import progressbar
File "C:\Users\mona6\AppData\Local\Temp\pip-build-0_37al8d\progressbar\progressbar\__init__.py", line 59, in <module>
from progressbar.widgets import *
File "C:\Users\mona6\AppData\Local\Temp\pip-build-0_37al8d\progressbar\progressbar\widgets.py", line 121, in <module>
class FileTransferSpeed(Widget):
File "C:\ProgramData\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\mona6\AppData\Local\Temp\pip-build-0_37al8d\progressbar\
我有:
E:\opensource_codes\semi-auto-anno\src>python
Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
我应该如何安装Python 3.6.0的进度条?
答案 0 :(得分:3)
conda install progressbar2
或者
pip install progressbar2
答案 1 :(得分:1)
不确定是否是最佳方法,但对我有用:
$ git clone https://github.com/coagulant/progressbar-python3.git
Cloning into 'progressbar-python3'...
remote: Counting objects: 30, done.
remote: Total 30 (delta 0), reused 0 (delta 0), pack-reused 30
Unpacking objects: 100% (30/30), done.
mona6@DESKTOP-0JQ770H MINGW64 /e/opensource_codes
$ ls
cnpy/ depth-masking-src/ gesture_recognition/ semi-auto-anno/
cnpy_cmake/ depth-masking-src.zip progressbar-python3/
mona6@DESKTOP-0JQ770H MINGW64 /e/opensource_codes
$ cd progressbar-python3/
mona6@DESKTOP-0JQ770H MINGW64 /e/opensource_codes/progressbar-python3 (master)
$ ls
ChangeLog.yaml LICENSE.txt progressbar/ README.txt tox.ini
examples.py* MANIFEST.in README.md setup.py*
E:\opensource_codes\progressbar-python3>python setup.py install
C:\ProgramData\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\dist.py:331: UserWarning: Normalizing '2.3dev' to '2.3.dev0'
running install
running bdist_egg
running egg_info
creating progressbar.egg-info
writing progressbar.egg-info\PKG-INFO
writing dependency_links to progressbar.egg-info\dependency_links.txt
writing top-level names to progressbar.egg-info\top_level.txt
writing manifest file 'progressbar.egg-info\SOURCES.txt'
reading manifest file 'progressbar.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'progressbar.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\progressbar
copying progressbar\compat.py -> build\lib\progressbar
copying progressbar\progressbar.py -> build\lib\progressbar
copying progressbar\widgets.py -> build\lib\progressbar
copying progressbar\__init__.py -> build\lib\progressbar
creating build\bdist.win-amd64
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\progressbar
copying build\lib\progressbar\compat.py -> build\bdist.win-amd64\egg\progressbar
copying build\lib\progressbar\progressbar.py -> build\bdist.win-amd64\egg\progressbar
copying build\lib\progressbar\widgets.py -> build\bdist.win-amd64\egg\progressbar
copying build\lib\progressbar\__init__.py -> build\bdist.win-amd64\egg\progressbar
byte-compiling build\bdist.win-amd64\egg\progressbar\compat.py to compat.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\progressbar\progressbar.py to progressbar.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\progressbar\widgets.py to widgets.cpython-36.pyc
byte-compiling build\bdist.win-amd64\egg\progressbar\__init__.py to __init__.cpython-36.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying progressbar.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying progressbar.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying progressbar.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying progressbar.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist\progressbar-2.3.dev0-py3.6.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing progressbar-2.3.dev0-py3.6.egg
Copying progressbar-2.3.dev0-py3.6.egg to c:\programdata\anaconda3\lib\site-packages
Adding progressbar 2.3.dev0 to easy-install.pth file
Installed c:\programdata\anaconda3\lib\site-packages\progressbar-2.3.dev0-py3.6.egg
Processing dependencies for progressbar==2.3.dev0
Finished processing dependencies for progressbar==2.3.dev0
E:\opensource_codes\progressbar-python3>python
Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import progressbar
>>>
答案 2 :(得分:-1)
尝试命令:
python3.6 -m pip install progressbar