|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
我想实现一个下载的进度条显示。
- import time
- for i in range(1,10):
- print(i,end='\r')
- time.sleep(3)
复制代码
这个是我的初步代码,在linux上运行正常,但是在windows下无效。
希望有人可以指导。
说明一下我用的是python3,progressbar在我的环境上装不上,报错信息如下:
- C:\Users\Administrator>pip install 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 1, in <module>
- File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-451w14mm\progressbar\setup.py", line 5, in <module>
- import progressbar
- File "c:\users\admini~1\appdata\local\temp\pip-build-451w14mm\progressbar\progressbar\__init__.py", line 59, in <module>
- from progressbar.widgets import *
- File "c:\users\admini~1\appdata\local\temp\pip-build-451w14mm\progressbar\progressbar\widgets.py", line 121, in <module>
- class FileTransferSpeed(Widget):
- File "c:\program files\python\python35\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-451w14mm\progressbar\
复制代码
|
|